Skip to content

Commit

Permalink
Try advanced_cors module
Browse files Browse the repository at this point in the history
  • Loading branch information
protitude committed Oct 30, 2024
1 parent 72ac606 commit 410a2f7
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 20 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"composer/installers": "^1.2",
"cweagans/composer-patches": "^1.6",
"drupal/access_by_ref": "^3.0",
"drupal/advanced_cors": "^1.5",
"drupal/auditfiles": "^4.1@beta",
"drupal/better_exposed_filters": "^6.0",
"drupal/block_exclude_pages": "^2.0",
Expand Down
54 changes: 53 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
uuid: bf6f0448-48a8-4679-acd0-6f8b816a4905
langcode: en
status: true
dependencies: { }
id: apis
label: APIs
weight: 0
patterns: "/api/1.0/affinity_groups/*\r\n/api/1.0/kb/*\r\n/api/1.0/events/ag/*\r\n/api/1.1/events/ag/*\r\n"
allowed_headers: '*'
allowed_methods: '*'
allowed_origins: "https://access-ci.org\r\nhttps://access-ci-org.github.io\r\nhttp://localhost:*"
exposed_headers: ''
max_age: ''
supports_credentials: 'true'
1 change: 1 addition & 0 deletions web/sites/default/config/default/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module:
access_shortcodes: 0
action: 0
actions_permissions: 0
advanced_cors: 0
auditfiles: 0
automated_cron: 0
better_exposed_filters: 0
Expand Down
19 changes: 0 additions & 19 deletions web/sites/default/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,22 +170,3 @@ parameters:
- sftp
- webcal
- rtsp

# Configure Cross-Site HTTP requests (CORS).
# 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: true
# Specify allowed headers, like 'x-allowed-header'.
allowedHeaders: ['x-csrf-token','authorization','content-type','accept','origin','x-requested-with', 'access-control-allow-origin','x-allowed-header','*']
# Specify allowed request methods, specify ['*'] to allow all possible ones.
allowedMethods: ['*']
# Configure requests allowed from specific origins.
allowedOrigins: ['https://access-ci-org.github.io/', 'https://access-ci.org/', 'https://*.access-ci.org/']
# 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

0 comments on commit 410a2f7

Please sign in to comment.