天天看點

Nginx https轉http 微信内部浏覽器報跨域問題

個人部落格位址

用https通路了http域名,微信内部浏覽器報跨域問題;類似下圖

Nginx https轉http 微信内部浏覽器報跨域問題

解決方案:

在nginx配置檔案對應的location中增加配置

add_header 'Access-Control-Allow-Origin' 'https://news.xionghaizhi.work';
add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept';
           

參考部落格園

繼續閱讀