You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Dashboard!
You're running version >=1.0.23 of Parse Dashboard.
You're running version >=2.3.2 of Parse Server.
You've searched through existing issues. Chances are that your issue has been reported or resolved before.
Environment Setup
Issue
I'm using the parse-dashboard as express-middleware, and I'm mounting on /dashboard route:
dashboardApp.use('/dashboard',dashboard);
My API is being mounted on a subpath in my organization, e.g. https://my.org/sub/path, which means the Dashboard would be accessible at https://my.org/sub/path/dashboard.
But in the app, the path taken by parse-dashboard is /dashboard, which leads to incorrect resources paths in the HTML.
As you can see, it loads the resources from the base path.
The expected behavior should be to load the resources with /sub/path/dashboard prefix.
Steps to reproduce
Mount express app in a subpath.
constdashboardApp=express();// ParseDashboard takes '/dashboard' as mountpathdashboardApp.use('/dashboard',dashboard);// Mount dashboard at /sub/path/dashboardapp.use('/sub/path/',dashboardApp);consthttpServer=require('http').createServer(app);httpServer.listen(port);
You can see the complete example simulating the problem here.
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Dashboard!
You're running version >=1.0.23 of Parse Dashboard.
You're running version >=2.3.2 of Parse Server.
You've searched through existing issues. Chances are that your issue has been reported or resolved before.
Environment Setup
Issue
I'm using the parse-dashboard as express-middleware, and I'm mounting on
/dashboard
route:My API is being mounted on a subpath in my organization, e.g.
https://my.org/sub/path
, which means the Dashboard would be accessible athttps://my.org/sub/path/dashboard
.But in the app, the path taken by parse-dashboard is
/dashboard
, which leads to incorrect resources paths in the HTML.I have created an example here simulating the problem.
Console logs:
As you can see, it loads the resources from the base path.
The expected behavior should be to load the resources with
/sub/path/dashboard
prefix.Steps to reproduce
Mount express app in a subpath.
You can see the complete example simulating the problem here.
My simple solution
In this part of the code:
parse-dashboard/Parse-Dashboard/app.js
Line 62 in 92fe6a5
I have added an option in the middleware to support a
prefix
param.and it can be used as:
I want to know what are your regardings about it.
If you think this feature can be added, I could take it.
Logs/Trace
Note: If you get a browser JS error please run
npm run dev
. This will provide source maps and a much more useful stack trace.The text was updated successfully, but these errors were encountered: