irodriguez-nebustream opened a new issue, #33353:
URL: https://github.com/apache/superset/issues/33353

   ### Bug description
   
   Bug description*
   When Superset is configured with SUPERSET_APP_ROOT set to a non-root path 
(e.g., "/prefix"), the embedded dashboard's API call to /api/v1/me/roles/ fails 
with a 404 error because the endpoint doesn't account for the application root 
path.
   Reproduction steps:
   
   Configure Superset with SUPERSET_APP_ROOT="/prefix" in the config
   Embed a dashboard using the embedDashboard() SDK function
   Monitor the network requests
   
   Expected behavior:
   The API call should go to /prefix/api/v1/me/roles/ (with the app root 
prefix) to match the subpath routing configuration.
   Actual behavior:
   The API call goes to /api/v1/me/roles/ (without the prefix), resulting in a 
404 error because the route doesn't exist at the root level.
   Root cause:
   ```
   In superset-frontend/src/embedded/index.tsx, the start() function has a 
hardcoded endpoint path that doesn't consider the application root:
   typescriptconst getMeWithRole = makeApi<void, { result: 
UserWithPermissionsAndRoles }>({
     method: 'GET',
     endpoint: '/api/v1/me/roles/',  // Hardcoded path, no app root
   });
   ```
   
   ### Screenshots/recordings
   
   Console error showing 404 for /api/v1/me/roles/ when Superset is configured 
with SUPERSET_APP_ROOT="/prefix"
   
   
![Image](https://github.com/user-attachments/assets/ecf6d65c-22e3-4fce-97bf-eecad13404e2)
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.10
   
   ### Node version
   
   I don't know
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to