I've got an express server that I've uploaded to an ec2. Prior, I've verified that it works on my PC using localhost.
I've added cors using node, I've created an API Gateway for post, still getting the error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at /register. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Where do I need to look? I didn't make any changes to my route after creating the API Gateway, so I'm not sure if I need to do anything else. All I did was create a /register resource with a Post method, and enabled CORS on the resource.
In my express server, I'm using the cors module:
const cors = require('cors')
app.use(cors());
For my first route in aws, I have this route in the express server:
router.post('/register', (req, res) => {
In my AWS API Gateway, I created the route:
In my firefox console, if I click on the link in the messages, I get this: