Add: Options method to APIGateway staging.
Since we use credentials: include browsers sends a OPTION request. But our API gateway don't have so we need to it add it.
Steps to the OPTIONS method in the API gateway.
- Visit API gateway
region: us-east-1
Select /feature-flags and then select enable cors
- Filling the details as per screenshot:
Access-Control-Allow-Origin: *
Note: We are using * in Access-Control-Allow-Origin because our code handles it with regex and API gateway does not support *.rds.com and a regex.
Access-Control-Allow-Methods: GET, OPTIONS, POST
Access-Control-Allow-Headers: Authorization, Content-Type, Cache-Control, Cookie
Access-Control-Expose-Headers: Set-Cookie
- Click on
save
- we have do similar for other routes marked in below below
at last
5. Click on deploy API
- Select a stage
dev and click on Deploy

Add:
Optionsmethod to APIGateway staging.Since we use
credentials: includebrowsers sends a OPTION request. But our API gateway don't have so we need to it add it.Steps to the
OPTIONSmethod in the API gateway.region: us-east-1Select
/feature-flagsand then selectenable corsAccess-Control-Allow-Origin: *Note: We are using
*inAccess-Control-Allow-Originbecause our code handles it withregexand API gateway does not support*.rds.comand a regex.Access-Control-Allow-Methods: GET, OPTIONS, POSTAccess-Control-Allow-Headers: Authorization, Content-Type, Cache-Control, CookieAccess-Control-Expose-Headers: Set-Cookiesaveat last
5. Click on
deploy APIdevand click onDeploy