I have an issue where my site returns a 500 error if I use the direct domain like example.com, but it works fine with www.example.com or subdomain.example.com. I’m using “@sidebase/nuxt-auth”: “^0.7.2” for authentication. The site works fine on localhost, but the issue occurs only in production.
[GET] "https://example.com/api/auth/session?callbackUrl=https:%2F%2Fexample.com%2F": <no response> fetch failed
The site is running on SSR mode and it’s served on a VPS.
I’m using Nginx for proxy pass to my app in production: proxy_pass http://localhost:3000/;
. The domain is managed by Cloudflare, with their free SSL certificate.
Is this a Nuxt or Nuxt-auth issue? Or is it related to Nginx or Cloudflare?