2017-10-16 7 views
0

私は基本的なbitnamiワードプレスインストールを持っています。私は彼らのガイドとセットアップhttpsとhttpsのリダイレクトへの自動httpに従った。ApacheはhttpからhttpsへのAccess-Control-Allow-Originを設定しました

しかし、私は、私は次のエラーを取得する外部スクリプトをロードしようとしたとき:

Failed to load https://external-script.com/: The 'Access-Control-Allow-Origin' 
header has a value 'http://my-site.io' that is not equal to the supplied origin. 
Origin 'https://my-site.io' is therefore not allowed access. 

私は、どのファイルを編集する必要がありますし、私が何を追加する必要がありますか? ありがとう

答えて

2

Bitnamiエンジニアはこちら

ワードプレスでCORSを有効にする必要があります。それを達成するために、あなたはその後

... 
<Directory /opt/bitnami/apps/wordpress/htdocs/> 
... 
Header set Access-Control-Allow-Origin "*" 
... 
</Directory> 

installdir/apps/wordpress/conf/httpd-app.confファイルに次の行を設定する必要があります、あなたは、この構成をロードするために、Apacheサーバを再起動する必要があります。

installdir/ctlscript.sh restart apache 

また、our documentation guideに従うことでCORSを有効にするさまざまな方法があります。

よろしく、 イオタ

+0

はい、CORSは確かに行く方法です。がんばろう! – Siyah

関連する問題