Where did you put cors=true ? Could you add the code?
I donβt know exactly where you put cors = true , this bit of code can help you:
server.connection({ routes: { cors: true } })
Or try adding the allowed courts in the configuration section of your route.
server.route({ config: { cors: { origin: ['*'], additionalHeaders: ['cache-control', 'x-requested-with'] } },
Take a look at this question: hapi.js Cors Pre-flight does not return Access-Control-Allow-Origin header
James111
source share