Release Notes
Security Announcement
Announcements
Header Field | Description |
Access-Control-Allow-Origin | Values support constants and variables. Among them: Constant: support input *, multiple domain names, IPs, or a mix of domain names and IPs (must contain http:// or https://, such as http://test.com,http://1.1.1.1. Multi-values can be separated by English commas, and up to 1000 characters can be entered.Variable: Match the required cross-origin originating domain via the Origin request header, using the header value ${http.request.headers["Origin"]}. |
Access-Control-Allow-Methods | Used to set the allowed HTTP request methods for cross-origin, you can simultaneously set multiple methods, such as POST, GET, OPTIONS. Multi-values can be separated by English commas, and up to 1000 characters can be entered. |
Access-Control-Max-Age | Used to specify the valid time of preflight request, unit: Seconds, support input 0 ~ 2147483647 integer values.For non-simple cross-origin requests, an additional HTTP query request, called a "pre-request," is required before formal communication to determine whether the cross-origin request is safe and acceptable. The following requests are deemed non-simple cross-origin requests: - Requests initiated via methods other than GET, HEAD, or POST - POST requests with data types other than application/x-www-form-urlencoded, multipart/form-data, or text/plain, such as application/xml or text/xml - Requests using custom request headers, such as Access-Control-Max-Age: 1728000, indicating that no additional pre-request is needed for cross-origin access to the resource within 1728000 seconds. |
Access-Control-Allow-Origin header requires that the client request carries the Origin header and this header exactly matches any value set in Access-Control-Allow-Origin.Vary: Origin header, and the vary feature must be enabled on EdgeOne.www.example.com only allow page access acceleration domains from example.com, site.com. See the steps below.www.example.com.*.example.com, *.site.com.Access-Control-Allow-Origin, and header value set to ${http.request.headers["Origin"]}.
http://www.example.com, EdgeOne will respond with Access-Control-Allow-Origin: http://www.example.com.http://www.site.com, EdgeOne will respond with Access-Control-Allow-Origin: http://www.site.com.http://www.abc.com, EdgeOne will not respond with the cross-origin response header Access-Control-Allow-Origin.Access-Control-Allow-Origin.www.example.com allow all page access acceleration domains. See the steps below.www.example.com.Access-Control-Allow-Origin, and header value set to *.
Origin, EdgeOne will respond with Access-Control-Allow-Origin: *.Origin, EdgeOne will not respond with the cross-origin response header Access-Control-Allow-Origin.Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback