Created
March 6, 2014 13:29
-
-
Save kfuchs/9389692 to your computer and use it in GitHub Desktop.
Settings for NelmioCORSBundle that ended hours of misery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/config/config.yml | |
# The part that saved me was: | |
# 1: My quotes didn't wrap every header type in allow_headers | |
# 2: hosts: has to be set to the domain making the request. | |
nelmio_cors: | |
defaults: | |
allow_credentials: true | |
allow_origin: ['*'] | |
allow_headers: ['Authorization', 'Origin', 'Content-Type', 'Accept', 'X-Requested-With'] | |
allow_methods: ['GET', 'POST', 'PUT', 'PATCH', 'OPTIONS'] | |
#allow_methods: [] | |
expose_headers: ['*'] | |
max_age: 0 | |
hosts: ['domain.com'] | |
paths: | |
'^/': |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment