-
Notifications
You must be signed in to change notification settings - Fork 14
remove HEAD/GET rewrite #15
Comments
Still not convinced by this; security risk should be addressed by only doing this if GET is the only method registered for that uri (part of #13). Also don't think it's appropriate for the only way to do this to be middleware that's aware of the routing table. That said, some potential improvements:
|
a middlware doesn't actually need the routing table in order to replicate this, it just needs a "matcher" ( can be the base router in hack-router ) : https://github.com/nuxed/framework/blob/rx/src/Nuxed/Http/Router/Middleware/ImplicitHeadMiddleware.hack#L6-L87 |
To be safe and avoid the same same GET/POST -> HEAD issue even if it's multiple controllers or even different patterns that matcher must be the routing table |
https://github.com/hhvm/hack-router/blob/master/src/router/BaseRouter.php#L36
The text was updated successfully, but these errors were encountered: