v2board-user icon indicating copy to clipboard operation
v2board-user copied to clipboard

访问 流量明细出现这个提示f12

Open aiastia opened this issue 3 years ago • 1 comments

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.

aiastia avatar Jan 22 '22 00:01 aiastia

补充:只是访问流量记录才会这样。 如果在原始站点配置

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

aiastia avatar Jan 22 '22 01:01 aiastia