GuideReference
TrainingSupportCommunity
Reference

cors_​support

  • Property Manager name: CORS Protocol Support
  • Behavior version: The v2023-01-05 rule format supports the cors_​support behavior v1.0.
  • Rule format status: GA, stable
  • Access: Read/Write
  • Allowed in includes: Yes

Cross-origin resource sharing (CORS) allows web pages in one domain to access restricted resources from your domain. Specify external origin hostnames, methods, and headers that you want to accept via HTTP response headers. Full support of CORS requires allowing requests that use the OPTIONS method. See allow​_options.

OptionTypeDescriptionRequires
enabledboolean

Enables CORS feature.

{"displayType":"boolean","tag":"input","type":"checkbox"}
allow_​originsenum

In responses to preflight requests, sets which origin hostnames to accept requests from.

{"displayType":"enum","options":["ANY","SPECIFIED"],"tag":"select"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
ANY

Accept from any origin hostname.

SPECIFIED

Accept from a set of origin hostnames.

originsstring array

Defines the origin hostnames to accept requests from. The hostnames that you enter need to start with http or https. For detailed hostname syntax requirements, refer to RFC-952 and RFC-1123 specifications.

allow_​origins is SPECIFIED
{"displayType":"string array","tag":"input","todo":true}
{"if":{"attribute":"allowOrigins","op":"eq","value":"SPECIFIED"}}
allow_​credentialsboolean

Accepts requests made using credentials, like cookies or TLS client certificates.

{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
allow_​headersenum

In responses to preflight requests, defines which headers to allow when making the actual request.

{"displayType":"enum","options":["ANY","SPECIFIED"],"tag":"select"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
ANY

Allow any headers.

SPECIFIED

Allow a specific set of headers.

headersstring array

Defines the supported request headers.

allow_​headers is SPECIFIED
{"displayType":"string array","tag":"input","todo":true}
{"if":{"attribute":"allowHeaders","op":"eq","value":"SPECIFIED"}}
methodsstring array

Specifies any combination of the following methods: DELETE, GET, PATCH, POST, and PUT that are allowed when accessing the resource from an external domain.

{"displayType":"string array","options":["GET","POST","DELETE","PUT","PATCH"],"tag":"select"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
expose_​headersstring array (allows variables)

In responses to preflight requests, lists names of headers that clients can access. By default, clients can access the following simple response headers: Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, and Pragma. You can add other header names to make them accessible to clients.

{"displayType":"string array","tag":"input","todo":true}
{"if":{"attribute":"enabled","op":"eq","value":true}}
preflight_​max_​agestring (duration)

Defines the number of seconds that the browser should cache the response to a preflight request.

{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"enabled","op":"eq","value":true}}