如何解决跨域的问题

来源:8-1 与服务器通讯内容介绍

小资要奋斗

2017-05-03

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access.

我在发送一个跨域的请求时报错,是被默认阻止了,请问老师如何解决这个问题?

写回答

1回答

JoJo

2017-05-03

设置proxy代理转发,或者在服务端设置允许跨域请求。

0
1
小资要奋斗
非常感谢!
2017-05-03
共1条回复

Angular4.0从入门到实战 打造股票管理网站

Angular新特性,教你熟练使用 Angular 和 Typescript 开发组件式单页应用

2683 学习 · 1361 问题

查看课程