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

代理服务器跨域问题 #3169

Open
Reviewlike opened this issue May 9, 2020 · 8 comments
Open

代理服务器跨域问题 #3169

Reviewlike opened this issue May 9, 2020 · 8 comments

Comments

@Reviewlike
Copy link

Access to XMLHttpRequest at 'http://139.196.232.39:9000/login.jsp' (redirected from 'http://localhost:9528/data/table_list?page=0&size=10&searchText=') from origin 'http://localhost:9528' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
您好请问您一下,项目以上的错误,是不是我代理出现了问题呢,另外如果页面如果间隔一段时间不操作,刷新页面就会一直报错,请问是代理出现而导致的问题吗,烦请给点提示呢。 谢谢!

@bobetax-byte
Copy link

可以贴一下你的代理设置

@Reviewlike
Copy link
Author

proxy: {
'/': {
target: target,
changeOrigin:true, //是否跨域
//target: http://localhost:8080,
pathRewrite: { '^': '' }
}
}

@weil-f
Copy link

weil-f commented May 30, 2020

有没有大佬回复的啊,同问啊!!!+1+1+1+1

@HuangCongQing
Copy link

同样的问题,求解答!

@zenghnn
Copy link

zenghnn commented Sep 4, 2020

我也在这个问题搞吐了,一天了啊

@zenghnn
Copy link

zenghnn commented Sep 7, 2020

我最后是把API和网站放在同域名下再反向代理到本机端口来避免跨域。。。。

@PetersonLian
Copy link

PetersonLian commented Oct 22, 2020

提个思路。
我出现这个原因是,我把我的梯子,开了全局模式。改回pac就好了。
你们看下你的http请求,是不是被代理掉了。

@lizheng19581010
Copy link

提个思路。
我出现这个原因是,我把我的梯子,开了全局模式。改回pac就好了。
你们看下你的http请求,是不是被代理掉了。

好像就是本地梯子的问题,关了就好了。

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

7 participants