Trailing slash appended to robots.txt and sitemap.xml
Hi again,
I have found a new issue regarding trailing slashes, and can confirm that it is present in at least 2.2.3 and 2.2.4. The robots.txt (app/robots.ts) and sitemap.xml (app/sitemap.ts) files get a trailing slash appended, when they were previously left alone.
Happy to provide more details if required.
Thank you.
Are these special files that shouldn't have a trailing slash, even if trailingSlash is true?
@khuezy That is correct. They should "live" at root level, and not have a trailing slash, even if trailingSlash is true.
Cool thanks, are there any other special files that need to behave like this?
It looks like there is app/manifest.ts as well, but I think that is the complete list.
Looks like the recent PR to split the query string is adding a trailing slash no matter what: https://github.com/sst/open-next/pull/280/files#diff-ff1fb48147815ebc0cc31b6cd919e5d6eb405aa532707b0b2d0f90cd730a2a9cR184
Should only add trailing slash if trailingSlash is true AND it's not one of the exception above.
Can you create a PR for this?