3 ms·
I could certainly add this as a configuration option! Generally an SPA could do this by simply not having that route and handle accordingly but if it's somethin
by antihero 3y ago
I could certainly add this as a configuration option! Generally an SPA could do this by simply not having that route and handle accordingly but if it's something people would be interesting it is a quick change. Perhaps make a ticket/PR and I can look into adding it :)
That said, thinking about it - the server has no idea whether a client side route is actually correct.
You could have https://example.com/potato/tomato https://example.com/potato/tomato which will not exist on the server of course, but will be handled by client side JS on /index.html and could be a correct route within the app, so it is safer to 200 it.
SPAs aren't really generally made for SEO also. With something like Astro which is SEO friendly, it could actually return a 200 as expected and a 404 if not.