Skip to content

Commit

Permalink
added query parser setting and fixed custom url param parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
pocketcolin committed Jan 13, 2025
1 parent 34eb42e commit 832618a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/ParseServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ class ParseServer {
api.use(express.json({ type: '*/*', limit: maxUploadSize }));
api.use(middlewares.allowMethodOverride);
api.use(middlewares.handleParseHeaders);
api.set('query parser', 'simple')
const routes = Array.isArray(rateLimit) ? rateLimit : [rateLimit];
for (const route of routes) {
middlewares.addRateLimit(route, options);
Expand Down
2 changes: 1 addition & 1 deletion src/Routers/PagesRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ export class PagesRouter extends PromiseRouter {
*/
staticRoute(req) {
// Get requested path
const relativePath = req.params[0];
const relativePath = req.params['resource'][0];

// Resolve requested path to absolute path
const absolutePath = path.resolve(this.pagesPath, relativePath);
Expand Down

0 comments on commit 832618a

Please sign in to comment.