-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
API signing doesn't work with proxy #3168
Comments
Hi @chmelevskij Does it still fails if you do The API request is signed using sigv4 and the |
It fails in both cases. It also failing in using Netlify redirects. In the case of the local setup there is a mismatch in protocols/ports somewhere so it ends up with this error.
|
@chmelevskij Yeah, the mismatch is introduced by the webpack dev server. Do you need to proxy those calls? From https://facebook.github.io/create-react-app/docs/proxying-api-requests-in-development:
The recommendation here would be to not proxy calls to your API GW. |
That is what I ended up doing as a workaround. Enabling CORS on API gw and using that. It would be a nice feature to have, because then it's possible avoid dealing with CORS setup. In cases where api gateway is not managed by amplify setting up CORS properly is just extra work. I just have a suspicion that if it's not working with proxy, it might be a pain to deal with custom domains as well. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
In an effort to consolidate the context, comments, and criteria for success regarding improved support for proxies with Amplify, we'll be closing this issue in favor of the more recent #13048. Please follow that issue and leave any additional feedback there going forward. Thank you! |
Describe the bug
API request signing fails when requests are going through a proxy.
To Reproduce
API.get
or any other method.Expected behavior
I expect the request to work fine as with the custom domain setup.
Logs
Error response
The text was updated successfully, but these errors were encountered: