Skip to content

Commit

Permalink
Fix a collision in dev server URL handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tnajdek committed Sep 1, 2021
1 parent 831b152 commit f82d800
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/server.cjs
Expand Up @@ -17,7 +17,8 @@ const handler = (req, resp) => {
});
};

if(req.url.startsWith('/web') || req.url.startsWith('/search') || req.url.startsWith('/export') || req.url.startsWith('/import')) {
if(req.method === 'POST' && (req.url.startsWith('/web') || req.url.startsWith('/search') ||
req.url.startsWith('/export') || req.url.startsWith('/import'))) {
proxy.web(req, resp, {
changeOrigin: true,
target: `${translateURL}`,
Expand Down

0 comments on commit f82d800

Please sign in to comment.