nginx解决跨域问题

nginx解决跨域问题 描述 解决方法 描述 springboot项目中写一个get类型的/hello接口,返回字符串“Hello Spring boot.”,端口8080 在nginx的html目录下部署一个静态页面testget.html,端口80 如果要在这个html页面访问/hello接口,则会因为端口不同而遇到跨域问题。 解决方法 一、在nginx的配置文件default.conf中加入
相关文章
相关标签/搜索