Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aiastia opened this issue Jan 22, 2022 · 1 comment
Open

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

aiastia opened this issue Jan 22, 2022 · 1 comment

Comments

@aiastia
Copy link

aiastia commented Jan 22, 2022

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
Copy link
Author

aiastia commented Jan 22, 2022

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant