Skip to content

Fallback for Static Path Matching #133

Answered by jbr
jalcine asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not certain I understand what you're looking for, but there are two ways to make a fall-through router match. One is to mount a handler at "*", and the other is to do (Router::new().get(…), StaticCompiledHandler::new(…)) — the router will only halt the conn if it matches a route, so any unmatched route will continue onto the next handler. In routefinder, there's no distinction between "**" and "*" in that "*" matches anything including slashes, all the way to the end of the path

If instead, the need is to be able to always serve a specific file from the static file handler, there are changes I can release today that always serve a specific file regardless of path if instead of calling…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jalcine
Comment options

Answer selected by jalcine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants