私はcodeigniter
アプリケーションを作成しました。私はhttp://www.domain.com
にアップロードしました。クロスソースリソース共有ポリシーによってドメインの読み込みがブロックされました
しかしChrome
継続的にメッセージを与える...
Font from origin http://www.domain.com has been blocked from loading by Cross-Origin Resource Sharing policy. Origin 'http://domain.com' is therefore not allowed access
。
base_url
をconfig.php
に設定しても、http://www.domain.com
と表示されますが、エラーは引き続き発生します。
私はhttp://domain.com
としてbase_url
を変更した場合、それは
Font from origin http://domain.com has been blocked from loading by Cross-Origin Resource Sharing policy. Origin 'http://www.domain.com' is therefore not allowed access
...とエラーになります。
私はweb.config
に以下のコードを書いていますが、結果はありません。私はa、bを見てきました
<staticContent>
<clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 IST" cacheControlMode="UseExpires" />
<remove fileExtension=".woff" /> <!-- In case IIS already has this mime type -->
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
<remove fileExtension=".eot" />
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
</staticContent>
、cこれらのリンクが、解決できません。
どうすればよいですか?
UPDATE
は、実際にエラーがドメイン名から来ています。 config.php
base_url()
がhttp://domain.com
のときにwww.domain.com
と書くとエラーになります。一方、もし私のconfig.php
base_url()
がhttp://www.domain.com
である間に私がdomain.com
と書くと、それはエラーを返す。
ファイル
config/config.php
codeigniter
のフォントフォルダを設定し、この問題に答えを –@Spartan感謝を解決するあなたのファイル構造でそれを追加しますが、用あなたの情報、フォントフォルダはファイル構造の中にあります。アップデートをご覧ください。 – Raj