スキップしてコンテンツを表示

AWS Console - API gateway - Edit Authorizor - Save -> Network error.

0

Anyone else getting a network error in the AWS console when hitting save on an authorizer edit.

vendors.js:88608          PATCH https://apigateway.ap-southeast-2.amazonaws.com/v2/apis/0XXXXXXX9/authorizers/dXXXXw net::ERR_FAILED
handleRequest @ vendors.js:88608
<snip>
clickHandler @ vendors.js:6471
edit-attach:1 Access to XMLHttpRequest at 'https://apigateway.ap-southeast-2.amazonaws.com/v2/apis/0XXXXXXX9/authorizers/dXXXXw' from origin 'https://ap-southeast-2.console.aws.amazon.com' has been blocked by CORS policy: Method PATCH is not allowed by Access-Control-Allow-Methods in preflight response.

質問済み 4年前256ビュー

1回答
0

The error message indicates that there is a CORS (Cross-Origin Resource Sharing) issue. The PATCH request from the API Gateway console is being blocked due to the API Gateway not allowing the PATCH method in the Access-Control-Allow-Methods header.

To fix this issue, you will need to configure the CORS settings for your API Gateway to allow the PATCH method. Here are the steps:

  1. Go to the API Gateway console in the AWS Management Console.
  2. Navigate to the API you are working with.
  3. Go to the "Stages" section and select the stage you are working with (e.g., "prod", "dev", etc.).
  4. In the stage details, find the "CORS" section.
  5. Click on the "Edit" button to modify the CORS configuration.
  6. In the "Access-Control-Allow-Methods" field, add the "PATCH" method in addition to any other methods you have already configured (e.g., "GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH").
  7. Save the changes.
AWS

回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

関連するコンテンツ