CORS nastavitve v repozitorij

pull/26/head
Jurij Podgoršek 2023-11-12 18:39:57 +01:00
parent 1ef66a3d75
commit ec23f7fff6
2 changed files with 21 additions and 2 deletions

6
.gitignore vendored
View File

@ -7,8 +7,10 @@
# Ignore configuration files that may contain sensitive information # Ignore configuration files that may contain sensitive information
/web/sites/*/*settings*.php /web/sites/*/*settings*.php
/web/sites/default/settings.php !/web/sites/default/settings.php
/web/sites/*/*services*.yml /web/sites/*/default.services.yml
/web/sites/*/services.yml
!/web/sites/*/development.services.yml
# Ignore paths that may contain user-generated content # Ignore paths that may contain user-generated content
/web/sites/*/files /web/sites/*/files

View File

@ -0,0 +1,17 @@
parameters:
cors.config:
enabled: true
# Specify allowed headers, like 'x-allowed-header'.
allowedHeaders: ['x-csrf-token','authorization','content-type','accept','origin','x-requested-with']
# Specify allowed request methods, specify ['*'] to allow all possible ones.
allowedMethods: ['*']
# Configure requests allowed from specific origins.
allowedOrigins: ['*']
# Sets the Access-Control-Expose-Headers header.
exposedHeaders: false
# Sets the Access-Control-Max-Age header.
maxAge: false
# Sets the Access-Control-Allow-Credentials header.
supportsCredentials: false
twig.config:
debug: true