-
Notifications
You must be signed in to change notification settings - Fork 17
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
Improve CORS default configuration #202
Labels
Comments
We should definitely address this ASAP. I'd like to suggest something like this: config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '/public/*', headers: :any, methods: :get
resource '/api/*',
headers: :any,
expose: ['X-Page', 'X-PageTotal'],
methods: :any
end
end Maybe with an explicit or more restrictive list of allowed methods for the api routes, like What do you think @blackjid ? |
great, yes.. we should... |
rjherrera
added a commit
that referenced
this issue
Feb 17, 2020
rjherrera
added a commit
that referenced
this issue
Feb 17, 2020
LuisFros
pushed a commit
that referenced
this issue
Feb 21, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: