-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORS issue in deployment #449
Comments
:) |
Just a comment/note on the fact that 'We tried to add the allow_origin config for the API Gateway to include the frontend url, but it didn't work.'=> 'TEST' that time seems to be in a strange state. The value in 'allow_origin' terraform was run but did not see the value reflected on TEST. Also that same day when both Catherine and Ian experimenting on things that deployed terraform to TEST the subsequent deployment should have overridden previous deployment but it did not happen. On 27th, we decided to destroy TEST backend and redeploy and it looks like the CORS issue is gone for now. |
It is possible that Terraform applied the changes to API gateway, but they weren't 'made live' which is a manual operation in AWS. Similar to RDS where changing certain parameters won't go into effect until database maintenance / restart. |
After deploy to TEST, we saw a CORS problem that block the api call from frontend to backend in TEST.
The manual solution is go to the API Gateway for TEST, select the top level "/", and from the "Actions" dropdown, select "Enable CORS", and put test frontend url "https://fam-tst.nrs.gov.bc.ca" to the "Access-Control-Allow-Origin*" field, and click "Enable CORS and replace existing CORS headers". Then from "Actions" select "Deploy API", and select "V1" to redeploy the API.
We tried to add the allow_origin config for the API Gateway to include the frontend url, but it didn't work. We still need to manually add that in API Gateway and do the redeployment of api in API Gateway.
The text was updated successfully, but these errors were encountered: