Disable CORS for admin routes #155
Labels
api
Improvement or changes to the API
feature
New feature
future
improvement
Improvements to existing code
security
Everything regarding security of the server
Currently, all available routes has CORS enabled, meaning that you can send requests to the API from anywhere. In the future, it might be a good idea to not allow this for admin routes to improve security.
Adonis allows for dynamic configuration of the CORS policy based on the request method. Disabling CORS for all
POST
,PUT
andDELETE
operation should do the trick (with some exceptions).The text was updated successfully, but these errors were encountered: