dave
04/10/2021, 9:11 AMMatched (without verb)
MatchedWithoutHandler (this is used internally)
MethodNotMatched
Unmatched
An example of AND is matching a path AND a verb ( "/" bind GET to {}
)
An example of OR is matching routes("/api" bind ... , singlePageApp()
) <-- what we have here.
The problem is that the "/api" router returns a MethodNotMatched, and the SPA is greedy and will return the default index page for all requests (including OPTIONS).
On the following branch, I have stopped SPAs from accepting OPTIONS requests, which seems to fix the problem:
https://github.com/http4k/http4k/pull/605