Configure CORS on note-app-client for INCOMING requests
I've read countless pages talking about setting up a request proxy for the app-client TO an external API.
What I'm doing from the app on localhost:3000 is calling APIGateway which 302 redirects back to my app on localhost:3000, but throws a CORS error because the development server isn't emitting CORS headers.
I can't find a way to do this in a context that makes sense to me in terms of how this app is configured. I suspect it's some permutation of the header config here: https://webpack.js.org/configuration/dev-server/#devserverheaders- but various references assume too much knowledge of React so I'd really appreciate a note on how to configure the app-client portion of this course to respond with CORS appropriately.
Hmm I'm not sure I understand. Since the frontend is a static webpage, what does the redirect accomplish? Are you trying to show the user a message that the request was completed?
In this example the React app is the start and finish of an oAuth flow, the callback to which hits lamdba via apigateway and returns a 302 back to the app.
302 fails on local testing due to lack of cors emission on the dev server.
Sorry I don't have too much experience with this. Where are you seeing this error? In Lambda?