-
Notifications
You must be signed in to change notification settings - Fork 0
Disable CORS for admin routes #155
Copy link
Copy link
Open
Labels
apiImprovement or changes to the APIImprovement or changes to the APIfeatureNew featureNew featurefutureimprovementImprovements to existing codeImprovements to existing codesecurityEverything regarding security of the serverEverything regarding security of the server
Description
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 and DELETE operation should do the trick (with some exceptions).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
apiImprovement or changes to the APIImprovement or changes to the APIfeatureNew featureNew featurefutureimprovementImprovements to existing codeImprovements to existing codesecurityEverything regarding security of the serverEverything regarding security of the server