CORS withCredentials: Can Access-Control-Allow-Origin Have Multiple Domains?
When making a request with withCredentials set to true, the server's Access-Control-Allow-Origin response header can only specify a single origin. This means you cannot set multiple domains for allowed access.
For example, a response like this:
Access-Control-Allow-Origin: https://www.example.com
indicates that only requests originating from https://www.example.com are permitted to perform cross-domain operations. Requests from any other domains will be rejected. This restriction is designed to enhance security by preventing unauthorized access to sensitive data from untrusted sources.
原文地址: https://www.cveoy.top/t/topic/pmuv 著作权归作者所有。请勿转载和采集!