aws fargate prisma Hello everybody. In AWS Fargate...
# orm-help
a
aws fargate prisma Hello everybody. In AWS Fargate I run two services, a prisma server and a graphql server (using apollo-server-express, graphql-middleware and cors). I don't understand why I got this error in chrome (v76) everytime I made a request from client side (first image). This is my configuration from server (second image). Thanks in advance for any hint.
a
Subdomains are different so you should add cors options with origin header to express config. e.g. const corsOptions = { optionsSuccessStatus: 200, credentials: true, origin(origin, callback) { if ( origin === 'XXXXX' ) { callback(null, true); } else { callback(null, false); } }, }; app.use(cors(corsOptions));
a
@Alexander Thank you for the message. I will try what you suggested.
the main idea is that we need to check the req. headers .. .we only have access to them using corsDelegate ... is optionsSuccessStatus: 200 the option that should help fix the issue?
j