Commit 8a1f2e5f authored by tom's avatar tom

proper segment url filtering

parent 69bf9bd5
...@@ -6,5 +6,7 @@ export default function getUrlWithNetwork(_req: NextApiRequest, path: string) { ...@@ -6,5 +6,7 @@ export default function getUrlWithNetwork(_req: NextApiRequest, path: string) {
return [ return [
appConfig.api.basePath, appConfig.api.basePath,
path, path,
].filter(Boolean).join(''); ]
.filter((segment) => segment !== '' && segment !== '/')
.join('');
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment