Closed
Description
By default Next.js will redirect urls with trailing slashes to their counterpart without a trailing slash. For example /about/
will redirect to /about
. This has caused issues (see below).
@ascorbic created a proof of concept to add or remove trailing slashes in an edge function. This can be used to enable or disabled trailing slashes based upon the Next.js configuration.
Documentation
https://github.com/ascorbic/slash-edge
https://nextjs.org/docs/api-reference/next.config.js/trailing-slash