added cors bundle to allow external api access (#655)

This commit is contained in:
Kevin Papst
2019-03-23 11:04:55 +01:00
committed by GitHub
parent 13d9f8f3f7
commit 38ae013e03
8 changed files with 103 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
nelmio_cors:
defaults:
allow_credentials: false
allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
allow_headers: []
# allow_headers: ['Content-Type', 'Authorization', 'X-AUTH-USER', 'X-AUTH-TOKEN']
allow_methods: []
# allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
expose_headers: []
# expose_headers: ['Link']
max_age: 0
# max_age: 3600
hosts: []
origin_regex: true
forced_allow_origin_value: ~
paths:
'^/api/':
allow_origin: ['*']
allow_headers: ['X-AUTH-USER', 'X-AUTH-TOKEN']
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
max_age: 3600