Skip to content

跨域配置问题,修改依赖数据才生效 #2

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

Open
qlf5027849 opened this issue Oct 8, 2022 · 3 comments
Open

跨域配置问题,修改依赖数据才生效 #2

qlf5027849 opened this issue Oct 8, 2022 · 3 comments

Comments

@qlf5027849
Copy link

您好,跨域配置我发现是在vender依赖包中的event中,能否支持在根目录的event中配置跨域呢,本人是前端开发,不太理解。但从理解上不太期望修改依赖包中的数据

@qlf5027849
Copy link
Author

方便加一个联系方式吗?

@Joyboo
Copy link
Owner

Joyboo commented Oct 8, 2022

您好,在Event中有预留HTTP请求前置和后置function
当然,跨域最好是由nginx来处理
祝你顺利!

@Joyboo
Copy link
Owner

Joyboo commented Oct 8, 2022

常见的nginx跨域请求配置如下

add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers X-Requested-With,Token,Content-Type,Authorization,Accept-Language;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS,PATCH,DELETE,PUT;

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

2 participants