New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
report-uri always returns 404 #169
Comments
The routes are not defined in your application, add this to nelmio_security:
path: /nelmio/csp/report
defaults: { _controller: nelmio_security.csp_reporter_controller:indexAction }
methods: [POST] I guess the Symfony Flex Recipe should be updated 🤔 but I am not sure as this feature is optional. |
I probably tried adding the route at some point and must have forgot to clear the cache. |
I prefer to keep the console as clean as possible. If the default setup throws errors without it, the route should probably be in the recipe. Library consumers can restore their configs from git if they don't like it. Also once it gets configured by Symfony it won't run again unless the package is removed or something happens to vendor/ and symfony.lock. |
👍 for updating the Symfony Flex recipe. https://github.com/symfony/recipes/tree/master/nelmio/security-bundle |
This should be in an optional bundle. |
I can't seem to get the report-uri feature to work. I have made an demo for this issue. https://github.com/infomaniac50/nelmio-404. If you need anything else let me know.
These tools are installed globally:
To setup the clone:
Browse http://127.0.0.1:8000 and observe the debug console.
Chrome says something like:
The text was updated successfully, but these errors were encountered: