-
-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hello!
I tried catching all the requests in my server w/ a simple
app.get(.catchall, use: c.myHandler)
however it seems / is not caught.
Is this the expected behaviour?
Steps to reproduce
With this simple route
func routes(_ app: Application) throws {
let c = MyAwesomeController()
app.get(.catchall, use: c.myHandler)
}
Do curl localhost:8080
Expected behavior
My controller is called.
Actual behavior
It is not called and I get a 404 Not Found.
I have to add this in my routes.
app.get(use: c.myHandler)
Note that I donβt mind that! I juste want to be sure this is the expected behaviour (and maybe have a rationale if possible as to why if it is π).
Environment
- Vapor Framework version: 4.0.0-rc.3.12
- Vapor Toolbox version: 3.1.10
- OS version: 10.15.4
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Todo