next.js
09baadfd - Remove auto appending xml extension to dynamic sitemap routes (#65507)

Commit
1 year ago
Remove auto appending xml extension to dynamic sitemap routes (#65507) ### What Remove the auto appending `.xml` extension to the sitemap routes when it's a dynamic route. ### Why Previously we were adding `.xml` to `/[...paths/]sitemap` routes, but the bad part is when you use it to generate multiple sitemaps with `generateSitemaps` in format like `/[...paths/]sitemap.xml/[id]`, which doesn't look good in url format and it can be inferred as xml with content-type. Hence we don't need to add `.xml` in the url. Before this change it could also result into the different url between dev and prod: dev: `/sitemap.xml/[id]` prod: `/sitemap/[id].xml` Now it's going to be aligned as `/sitemap/[id]`. Users can add extension flexiblely. Closes NEXT-3357
Author
Parents
Loading