使用nginx代理后端服務時出現如下錯誤:
Mixed Content: The page at 'https://mydomain.com' was loaded over HTTPS, but requested an insecure stylesheet 'http://mydomain.com'. This request has been blocked. the content must be served over HTTPS.
錯誤原因:
nginx代理的https頁面中加載的內容使用的http協議導致報錯。
解決方法:
增加add_header Content-Security-Policy "upgrade-insecure-requests" 將http協議升級為https。