reactjsaxiosdevtoolsadonis.jsreferrer-policy

Can't solve strict-origin-when-cross-origin. React + AdonisJS


I have a server, in which I'm running two different applications. The frontend (express + React) is running on 443 port, and the AdonisJS api is running on 3333 port. They share the same domain (something.com, for example), but I need to add the port when calling the api. The problem is, when I try to hit an endpoint from my api from React, I get this error: strict-origin-when-cross-origin. Actually, I'm not sure if this is an error, but I can't make any request at all. From another client, such as Insomnia, the request works like magic.

Error in devtools when trying to log in


Solution

  • I fixed the issue by changing the AdonisJS cors config file. I switched the origin value from true to *.