How to create a service for all requests, regardless of path? #99
-
Hi everyone, I'm starting to feel like an idiot, because this seems like it should be simple: How do I create a service that handles all requests, regardless of the path? My use case is an HTTP server that redirects all incoming requests to HTTPS, preserving the path (and host). All the examples I found use Thank you, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Nesting a route at let app = nest("/", route("/", get(handler))); However this will capture all requests so handles added above it wont be called (routes are matched bottom to top). |
Beta Was this translation helpful? Give feedback.
Nesting a route at
"/"
should do the trick:However this will capture all requests so handles added above it wont be called (routes are matched bottom to top).