Hi guys!
Currently Im integrating the eventsub webhooks in my platform, but i have the next issue:
- All flow for enable a sub is successfully locally, the events shoots successfully locally too (all works correclty with ngrok locally).
- When I test this in my server twitch dont send me the requests to callback url, and the sub status is webhook_callback_verification_failed
- I see the logs of my server and the url callback never is requested for twitch with the challenge. My server have ssl enabled in 443 port, the url callback is: https://watcher.gantzerbot.xyz/notification
for complete the info, below I attach the nginx configuration:
upstream botcore {
server first:8000;
}
upstream botcorenode {
server second:3000;
}
server {
listen 80;
server_name gantzerbot.xyz www.gantzerbot.xyz;
return 301 https://gantzerbot.xyz$request_uri;
}
server {
listen 443 ssl http2;
server_name www.gantzerbot.xyz;
ssl_certificate /path/to/cert;
ssl_certificate_key /path/to/cert;
return 301 https://gantzerbot.xyz$request_uri;
}
server {
listen 443 ssl http2;
server_name gantzerbot.xyz;
proxy_connect_timeout 20s;
proxy_send_timeout 20s;
ssl_certificate /path/to/cert;
ssl_certificate_key /path/to/cert;
location / {
proxy_pass http://botcore;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
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-Host $server_name;
client_max_body_size 100M;
}
location /static/ {
alias /code/staticfiles/;
add_header Pragma public;
add_header Cache-Control "public";
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Max-Age 3600;
add_header Access-Control-Expose-Headers Content-Length;
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
}
location /media/ {
alias /code/media/;
add_header Pragma public;
add_header Cache-Control "public";
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Max-Age 3600;
add_header Access-Control-Expose-Headers Content-Length;
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
}
}
server {
listen 80;
server_name watcher.gantzerbot.xyz ;
return 301 https://watcher.gantzerbot.xyz$request_uri;
}
server {
listen 443 ssl http2;
server_name watcher.gantzerbot.xyz;
ssl_certificate /path/to/cert;
ssl_certificate_key /path/to/cert;
location / {
proxy_pass http://botcorenode;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#proxy_set_header Host $host;
proxy_set_header Host watcher.gantzerbot.xyz;
client_max_body_size 100M;
proxy_set_header Access-Control-Allow-Origin https://watcher.gantzerbot.xyz;
proxy_set_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,If-Modified-Since,Cache-Control,X-Requested-With,Accept,Content-Type, Origin';
proxy_set_header X-NginX-Proxy true;
proxy_redirect off;
}
I dont show other parts of code because this dont work in the server locally run perfect so i think that maybe the problem is in the nginx config.
Thanks in advance
Regards