在nginx.conf配置文件的location处加入这几句配置:

add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';

add_header 'Access-Control-Allow-Methods' 'GET';

如图:

nginx解决vue项目访问接口跨越问题

相关文章:

  • 2022-12-23
  • 2021-08-15
  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-13
  • 2022-01-12
  • 2021-06-28
  • 2021-09-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案