serve-handler icon indicating copy to clipboard operation
serve-handler copied to clipboard

If vercel handler is served under a path like /blog/ inside nginx then trailingSlash option redirects will redirect to top level domain name

Open GrosSacASac opened this issue 3 years ago • 1 comments

https://github.com/vercel/serve-handler/blob/c7a40435bc28b420a725e6dc1e9565d5b845dee2/src/index.js#L155

The solution is to use relative redirect links eg Location: ./folder/ instead of Location: /folder/

GrosSacASac avatar Mar 17 '22 17:03 GrosSacASac

with the trailingSlash option

GrosSacASac avatar Mar 17 '22 17:03 GrosSacASac