This is part of #378, since this is something possible in D8.2.x: https://www.drupal.org/node/2715637
As of Drupal 8.2, it's possible to opt in a particular site to enable CORS for responses served by Drupal.
(This is particularly helpful for fully decoupled Drupal sites which have JS that needs to talk to a Drupal 8 site's REST API. In such cases, that Drupal 8 instance often runs on a separate domain. Due to the same origin policy those requests will be blocked by the browser.)
This is not enabled by default because there are security consequences.
New in default.services.yml:
# 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: 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: ['*'] # 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: falseNote particular that
enabled: falsekey-value pair!
Recent comments
Hi Enthusiast, I had that problem with a site a while back and in that case it was a hosting problem with IPv6, which didn't work properly on the server this site was on. I updated...
Error when trying to check for updates
Hi. Welcome to Backdrop. Out of the box, there are two places you can set visibility by user ID and they are related: The layout configure screen under "Visibility conditions" (admin/structure/...
Use visibility User by uid
Start with clean URLs, add Pathauto and Metatag modules, submit your XML sitemap to Google Search Console, and keep your content original and well-structured.
How to Improve SEO Performance in Backdrop CMS