by nubinetwork · 3y ago · 0 comments
> Neither party is exactly wrong here, but the result is not ideal.
No, Prometheus has a bug if this is the case, and cks says it himself further on...
> all it would need to do is only give a HTTP 200 response for '/' and then a 404 (with the same HTML) for everything else that it answers with the generic front page
Of course you might still consider that a bug or wrong, but it's reality for a lot of web pages.
And I don't see the need to use a SPA almost anywhere. If you are gonna use a SPA for stuff that really doesn't require it, I think it behooves you to still atleast try to conform the the HTTP spec
A vulnerability scanner having to implement hairy heuristics to decide what's a vuln and what's a common false positive is literally its whole job.
To be fair, it's not about some rando on a blog post. The HTTP response codes and their semantics are in the RFCs. And while it's true the RFCs say SHOULD and not MUST, there are also now ~30 decades of experience and expectation that a non-existent resource is more likely a 404 not 200.
Sure a server can always do what it likes but can't expect it to play well with the outside world if it goes against both convention and documentation.