Reputation: 243
I have a web service architecture on Google cloud platform
if i entered domain(mydomain.com), it's heading to load balancer and then go to nginx that running on compute engine(virtual machine)
In nginx, proxy indicate 127.0.0.1:3000 and everything works well until now.
127.0.0.1:3000 calling 127.0.0.1:8000 api and cors problem occurs in this moment.
I did apply cors with wild card(*) but cors problem still in progress
how can i fix it?
Upvotes: 0
Views: 301
Reputation: 151
In express you should integrate cors with the specific package. Something like this
var express = require('express')
var cors = require('cors')
var app = express()
app.use(cors())
https://expressjs.com/en/resources/middleware/cors.html
Upvotes: 1