Configure CORS for /users/{userId} resource

  • Go to the Resources section of the UsersAPI.

  • Select the /users/{userId} resource.

  • Click Enable CORS.

    alt text

  • In the Enable CORS page - CORS Settings section:

    • For Access-Control-Allow-Methods, select GET, DELETE, POST.

    • Click Save.

      alt text

  • Click Details in the Successfully enabled CORS notification, you will see that API Gateway has:

    • Created OPTIONS method …

    • Added Access-Control-Allow-Origin to the GET/DELETE/POST method:

      • Method Response Header
      • Integration Response Header Mapping