Closed kacamific closed 5 months ago
@kacamific Could you please elaborate a bit more on the setup and where that request is being made, that error message doesn't seem to be coming from saas-starter-kit as far as we can see.
Godaddy domain is configured to sending requests to server which is running nginx. The nginx is used as proxy to forward the request to the localhost:3000 where saas-starter-kit is running. Nginx is used as SSL terminator. The configuration as following in conf.d
server {
server_name <domain>;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/<domain>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<domain>/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
server {
if ($host = <domain>) {
return 301 https://$host$request_uri;
}
listen 80;
server_name <DNS>;
return 404;
}
Does this help?
Are you passing all the headers through in nginx?
to my knowledge, yes
The strange part is the the operations are done properly on the server side, I thought maybe NextAuthjs has something to do thats why I asked
Doesn't seem to be coming from nextauthjs at first glance given that the request completes. You will have to trace the full request to figure out which layer is attaching that error.
@kacamific Saw a similar issue here https://github.com/nextauthjs/next-auth/discussions/4004#discussioncomment-3383677 Could you give it a try ?
I tried it and did not work for me.
I found this: https://github.com/svix/svix-cli/issues/76 But I am not using svix...
Solved the issue, I had set by mistake the api key for svix which was "activating" the sendEvent. Thnx for taking the time and answering.
Aah good to know, glad it's solved.
The website is referred via domain name and the solution is running behind nginx and I am getting the following error even though the backend API call was successful.
this happens only when fetch is used.
Do you have any hint where should I further check to find the issue?