dc71a5721b
### What We should respect the `trailingSlash` config for metadata canonical url, this PR is adding the handling for strip or keep the trailing slash for canonical url. Passing down trailingSlash config to metadata resolving to decide how we handle it. ### Why The tricky one was `/` pathname, when visiting the origin directly, that it will always have at least `/` in the URL instance. But for the default `origin`, it shouldn't show the `/` if the `trailingSlash` config is `false`. Also it should show trailing slash for all pathnames if that config is enabled. BTW there's a `__NEXT_TRAILING_SLASH` env but since we're using the fixed nextjs runtime module, so this can't be dynamically replaced in the metadata resolving modules. So we didn't use it Fixes #54070 Closes NEXT-2424 |
||
---|---|---|
.. | ||
app | ||
assets | ||
index.test.ts | ||
next.config.js |