#Self-Hosted unable to authenticate API due to CORS

3 messages · Page 1 of 1 (latest)

hasty olive
#

Hi team, I hope you are well

I'm fairly new to Directus, but have an ok understanding with website setup.

I have a self-hosted instance using a docker container, I also have nginx and letsencrypt in the docker-compose file to run so that I can access my instance on port :443

I have entered the CORS configuration to my docker-compose Environment variables as per the Directus documentation, but no matter what settings I put it makes no difference to my connection error.

My question is, do I need to make the changes to the nginx config as well? Or should the Directus env settings be correct?

FYI: I'm trying to connect and use data in a Shopify Hydrogen V2 app running on localhost:3000. Is this a potential cause?

gloomy loomBOT
#

Thanks for posting! This is a community powered server, so you may or may not get an answer based on available help and expertise. To increase your chances of somebody being able to help you, please help us help you making sure you:

  • Adding an explanation of exactly what you're trying to achieve.
  • Adding any and all related code or previous attempts.
  • Describing the exact issue or error you are facing.
  • Posting any screenshots if applicable.
  • Reading through https://stackoverflow.com/help/how-to-ask.

When you're done with this thread, please close it. Thanks! ✨

(If you have a support agreement and need help, please contact the core team via email.)

wind plume
#

If you have to configure the sites in Nginx, open the ports in the firewall and instead of localhost, use 127.0.0.1 and also try 0.0.0.0.0