v2board-user
v2board-user copied to clipboard
访问 流量明细出现这个提示f12
Access to fetch at 'https://原始网站.com/api/v1/user/server/getServerLogs' from origin 'https://分离网站.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
补充:只是访问流量记录才会这样。 如果在原始站点配置
add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept"; add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
则分离站点全部地方都提示Access-Control-Allow-Origin