diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/CorsCompilerPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/CorsCompilerPass.php index 3c66ad6..6f58ff7 100644 --- a/core/lib/Drupal/Core/DependencyInjection/Compiler/CorsCompilerPass.php +++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/CorsCompilerPass.php @@ -1,10 +1,5 @@ headers->set('Origin', ''); $cors_config['enabled'] = TRUE; - $cors_config['allowedOrigins'] = array('http://example.com'); + $cors_config['allowedOrigins'] = ['http://example.com']; $this->corsConfig = $cors_config; $this->container->get('kernel')->rebuildContainer(); diff --git a/sites/default/default.services.yml b/sites/default/default.services.yml index 511d25c..b310535 100644 --- a/sites/default/default.services.yml +++ b/sites/default/default.services.yml @@ -158,14 +158,14 @@ parameters: # Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS # for more information about the topic in general. # Note: By default the configuration is disabled. - cors.config: - enabled: false - # Specify allowed headers, like 'x-allowed-header'. - allowedHeaders: [] - # Specify allowed request methods, specify '*' to allow all possible ones. - allowedMethods: [] - # Configure requests allowed from specific origins. - allowedOrigins: ['*'] - exposedHeaders: false - maxAge: false - supportsCredentials: false + cors.config: + enabled: false + # Specify allowed headers, like 'x-allowed-header'. + allowedHeaders: [] + # Specify allowed request methods, specify '*' to allow all possible ones. + allowedMethods: [] + # Configure requests allowed from specific origins. + allowedOrigins: ['*'] + exposedHeaders: false + maxAge: false + supportsCredentials: false