用JavaScript fetch API取数据遇到CORS policy问题
版权声明:本文为博主汪子熙原创文章,未经博主允许不得转载。 https://jerry.blog.csdn.net/article/details/88420012
当把请求的url从上图替换成https://localhost:8080后出错:
No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
给请求响应的头部加上Access-Control-Allow-Origin等于*之后问题解决: