CORS domain requirements
-
- UpdatedJan 30, 2025
- 1 minute read
- Yokohama
- API implementation
When you define a cross-origin resource sharing (CORS) rule, the value you enter in the Domain field must meet certain requirements. Each CORS rule supports a single wildcard to match incoming Origin headers.
Requirements
- Begins with HTTP:// or HTTPS://.
- Is a domain pattern or IP address.
- Ends with alphanumeric characters preceded by a period, such as .com.
- Includes at most a single wildcard character immediately following the scheme and hierarchical portion of the domain pattern.
Wildcard
Domain matching
When evaluating the Origin header in a request, ServiceNow prioritizes rules that match the domain pattern exactly. If no exact match is found, the next closest match is used.
For example, if there are rules for the domain patterns http://*.blog.mysite.com and http://*.mysite.com, a request from http://alice.blog.mysite.com will match the http://*.blog.mysite.com pattern.