<@U01T16WR3T6> The way that the routing works is t...
# http4k
d
@Jippe Holwerda The way that the routing works is that it makes a selection of which route to serve based on AND or OR logic. There are different results that are possible, in order of precedence:
Copy code
Matched (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