2017-10-04 4 views
0

あります指定されたURLに成功応答を返します。応答はポストフォーマットであるので、私はangularでそれを処理できません。私はリダイレクトURLとしてバックエンドのURLを与えました。リダイレクトは、私は、角度4でフロントエンドでアプリを持っていると私は私のアプリ内決済サービスを統合した5</p> <p>レールにおけるバックエンドの無効なエラー

今、私はフロントエンド(角)にリダイレクトして、支払いサービスの応答を提供したいと考えています。

Response for preflight is invalid

時にはエラーが

Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response.

がどのようにこの問題を解決することである:それは私にエラーを与えているredirect_toメソッドレールを使用してオン

答えて

0

次のドキュメントを参照して、飛行前のリクエストを回避する方法をご覧ください。飛行前のリクエストが必須の場合は、適切なメソッド、起点、およびヘッダーを使用してサーバーで修正する必要があります。

プリフライトリクエストが送信される時期は、以下のドキュメントで明確に文書化されています。

https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

In particular, a request is preflighted if any of the following conditions is true: 

If the request uses any of the following methods: 
PUT 
DELETE 
CONNECT 
OPTIONS 
TRACE 
PATCH 
Or if, apart from the headers set automatically by the user agent (for example, Connection, User-Agent, or any of the other header with a name defined in the Fetch spec as a “forbidden header name”), the request includes any headers other than those which the Fetch spec defines as being a “CORS-safelisted request-header”, which are the following: 
Accept 
Accept-Language 
Content-Language 
Content-Type (but note the additional requirements below) 
Last-Event-ID 
DPR 
Downlink 
Save-Data 
Viewport-Width 
Width 
Or if the Content-Type header has a value other than the following: 
application/x-www-form-urlencoded 
multipart/form-data 
text/plain 
Or if one or more event listeners are registered on an XMLHttpRequestUpload object used in the request. 
Or if a ReadableStream object is used in the request. 
関連する問題