@data-fair/dev-server 2.0.5 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/dev-server",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "A development server for optimal development experience of data-fair applications.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/app.js CHANGED
@@ -75,7 +75,7 @@ app.post('/config/error', (req, res) => {
75
75
  });
76
76
  // re-expose the application performing similar modifications to the body as data-fair
77
77
  const appUrl = new URL(config.app.url);
78
- const appPrefix = appUrl.pathname === '/' ? '' : appUrl.pathname;
78
+ const appPrefix = appUrl.pathname.endsWith('/') ? appUrl.pathname.substring(0, appUrl.pathname.length - 1) : appUrl.pathname;
79
79
  app.use('/app', createProxyMiddleware({
80
80
  target: appUrl.origin,
81
81
  secure: false,