Link Search Menu Expand Document

Configuring CORS

The Cross-Origin Resource Sharing (CORS) settings can be found in the config.json file in the API backend directory. If the file does not exist, create one using this template file as a template.

Edit the content of the file to show (adjusting the values accordingly):

Allowing any domain from a list

{
  "cors": {
    "allowedOrigins": [
      "http://localhost:5500",
      "http://127.0.0.1:5500"
    ]
  }
}

Allowing any origin

CAUTION: This configuration is not recommended as it relaxes the security rules for your instance, but it can be handy for debugging purposes.

{
  "cors": {
    "allowedOrigins": [
      "*"
    ]
  }
}