jdesrosiers / silex-cors-provider

A silex service provider that adds CORS services to silex
MIT License
78 stars 25 forks source link

405 rather than a 404 on route not found #34

Closed thewilkybarkid closed 7 years ago

thewilkybarkid commented 7 years ago

CorsServiceProvider makes the OPTIONS method available for any path. If I do a GET request to a route that doesn't exist, Silex returns a 405 Method Not Allowed rather than the expected 404 Not Found.

jdesrosiers commented 7 years ago

Thanks for bringing this to my attention. I'm looking into it. It correctly handles 404 for CORS preflight requests, but I didn't realize it was giving the wrong response for non-CORS requests.

jdesrosiers commented 7 years ago

I just tagged a fix. Please let me know if you have any more issues.

thewilkybarkid commented 7 years ago

Great, thanks for the prompt fix!