mirror of
https://github.com/symfony/recipes.git
synced 2026-09-12 07:36:30 +03:00
Add a recipe for NelmioCorsBundle
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
nelmio_cors:
|
||||
defaults:
|
||||
origin_regex: true
|
||||
allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
|
||||
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
|
||||
allow_headers: ['Content-Type', 'Authorization']
|
||||
max_age: 3600
|
||||
paths:
|
||||
'^/': ~
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"bundles": {
|
||||
"Nelmio\\CorsBundle\\NelmioCorsBundle": ["all"]
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/"
|
||||
},
|
||||
"env": {
|
||||
"CORS_ALLOW_ORIGIN": "^https?://localhost:?[0-9]*$"
|
||||
},
|
||||
"aliases": ["cors"]
|
||||
}
|
||||
Reference in New Issue
Block a user