nginx解決vue項目訪問接口跨越問題

在nginx.conf配置文件的location處加入這幾句配置: add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET'; 如圖:
相關文章
相關標籤/搜索