CORS repare for api

This commit is contained in:
Rurik19 2017-10-04 12:19:09 +03:00 committed by Jeremy Benoist
parent 47e4784110
commit a9f61d3dbb
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C

View file

@ -147,18 +147,18 @@ nelmio_cors:
paths: paths:
'^/api/': '^/api/':
allow_origin: ['*'] allow_origin: ['*']
allow_headers: ['X-Custom-Auth'] allow_headers: ['Authorization','content-type']
allow_methods: ['POST', 'PUT', 'PATCH','GET', 'DELETE'] allow_methods: ['POST', 'PUT', 'PATCH','GET', 'DELETE']
max_age: 3600 max_age: 3600
'^/oauth/': '^/oauth/':
allow_origin: ['*'] allow_origin: ['*']
allow_headers: ['X-Custom-Auth'] allow_headers: ['Authorization','content-type']
allow_methods: ['POST', 'PUT', 'GET', 'DELETE'] allow_methods: ['POST', 'PUT', 'GET', 'DELETE']
max_age: 3600 max_age: 3600
'^/': '^/':
#origin_regex: true #origin_regex: true
allow_origin: ['^http://localhost:[0-9]+'] allow_origin: ['*']
allow_headers: ['X-Custom-Auth'] allow_headers: ['Authorization','content-type']
allow_methods: ['POST', 'PUT', 'GET', 'DELETE'] allow_methods: ['POST', 'PUT', 'GET', 'DELETE']
max_age: 3600 max_age: 3600
hosts: ['^api\.'] hosts: ['^api\.']