AlexxNB / tinro

Highly declarative, tiny, dependency free router for Svelte's web applications.
MIT License
669 stars 30 forks source link

Send 404 on fallback route (?) #107

Closed VentGrey closed 2 years ago

VentGrey commented 2 years ago

This library is marvellous. However it is a little SEO killer when it comes to 404 errors as it serves text or a component but the server response is always 200. :thinking: Is there a way to change this to respond with a 404 error?

Maybe I'm asking the impossible since response status cannot be changed with client-side JS but something can be done...right? :scream:

AlexxNB commented 2 years ago

It is impossible when routing on client side. Status can be returned only by the server.