角度2アプリ(angular-cliを使用)を実行していて、サーバーAPI呼び出し(すべての(*)のCORSアクセスがAPIコード内で実装されている)を実行しています。角度2 - ChromeとIE(11)CORSの問題
今、私はいつか私は全くCORSの問題にサーバーからの応答を取得していますし、いつか私は問題の下に取得しています、角度2アプリからのAPI呼び出しを行うにしようとしています:
Chromeのブラウザ:IE(11)ブラウザ上記ブラウザの両方について
SEC7120: Origin http://localhost:4200 not found in Access-Control-Allow-Origin header.
File: localhost:4200
SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.
File: localhost:4200
について
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
XMLHttpRequest cannot load https://server.com/api/currency.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://localhost:4200' is therefore not allowed access. The response had HTTP status code 500.
レスポンスヘッダが
を返しますResponse : HTTP/1.1 500 Interenal Server Error
Content-Length : 0
また、ブラウザのキャッシュをクリアしてみましたが、期待通りに機能していないため、再度上記の問題に遭遇しています。
上記のヘルプは本当に感謝しています。
ありがとうございます!
[トピック](http://stackoverflow.com/questions/36002493/no-access-control-allow-origin-header-in-angular-2-app)は何度もあったようです。 –
私は同じ問題に直面しています。私はOSX El Capitan 10.11.6、Chrome 58.0.3029.96を使用しています。この問題はSafariでは発生しません。 –