Closed Frankjunyulin closed 1 year ago
Hi, @Frankjunyulin - try appending Access-Control-Allow-Headers,Access-Control-Allow-Origin
to the current value in the Access-Control-Allow-Headers
field and then deploy the change. Let us know if that helps.
Hi @iartemiev , I appended those two values to Access-Control-Allow-Headers
with action Deploy API
but still failed. Do I need to add them to the index.js
under my amplify api or there is anything else that I can check?
The error message was slightly different
More information:
Preflight OPTION
request and response looks fine with the access control:
However, the POST
response doesn't have the access control:
Please check, thanks!
It seems we have figured it out. So close this now. Thanks!
It seems we have figured it out. So close this now. Thanks!
How did you solve this?
Before opening, please confirm:
JavaScript Framework
React, Next.js
Amplify APIs
REST API
Amplify Categories
function, api
Environment information
Describe the bug
We keep getting the CORS issue for our app, please see our screenshot:
Expected behavior
There is no CORS error, our app work properly.
Reproduction steps
Then you will see the CORS issue in the console
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots