Closed abdatta closed 3 years ago
This sounds like your accepts
header isn't set properly. The SPA middleware checks for accepts
of html
, and only will send a response when that's true
.
If you set your accepts
header to JSON (application/json
), this shouldn't happen.
The title says it all! When we get a 404 response from a proxied backend, it should not fall back to
index.html
even whenspa: true
.A backend server often returns a 404 response when it fails to find some resource. This response is often used by an SPA frontend to show the info in a nice format. We don't want such a request to fallback to an HTML file (with 200 response).
It'll be very helpful if you can either make it the default behaviour to not to fallback from proxied responses, or maybe add a new flag that can turn on this ability.
Thank you for this very helpful plugin!