我已經使用 nginx 創建了一個代理服務器。我使用 Certbot 安裝了 SSL 證書。安裝 SSL 后,No 'Access-Control-Allow-Origin' header前端出現錯誤。我將add_header 'Access-Control-Allow-Origin' '*'命令添加到 .conf 檔案中。但我不斷收到同樣的錯誤。
錯誤: Access to fetch at 'https://api.mywebsite.com/api/users' from origin 'https://panel.mywebsite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
我的前端網站: 
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/531070.html
