From 2851af8ca8f5d5c91f35dcc671ed4d88678ffc52 Mon Sep 17 00:00:00 2001 From: evan Date: Sat, 16 May 2026 09:58:49 -0700 Subject: [PATCH 1/5] add webhook path to clark nginx --- nginx.conf | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/nginx.conf b/nginx.conf index e3b8790fc..2cc3177fc 100644 --- a/nginx.conf +++ b/nginx.conf @@ -158,6 +158,24 @@ http { return 404 "oops! we couldnt load your interview question lol, i guess this ones free!"; } + # Route GitHub Webhooks to the gateway + location /webhook { + proxy_pass http://webhook-gateway:5000/webhook; + 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; + } + + # Route the WebSocket connection over the same port + location /tunnel { + proxy_pass http://webhook-gateway:5000/ws-tunnel; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $host; + } + #Load balancer location /api/scevents/ { resolver 127.0.0.11 valid=15s; From 0cbbac5c178acebea7ff28e546b19d7cabee1d13 Mon Sep 17 00:00:00 2001 From: evan Date: Sat, 25 Jul 2026 15:16:18 -0700 Subject: [PATCH 2/5] rename to smee2 --- nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx.conf b/nginx.conf index 2cc3177fc..cb4c36756 100644 --- a/nginx.conf +++ b/nginx.conf @@ -160,7 +160,7 @@ http { # Route GitHub Webhooks to the gateway location /webhook { - proxy_pass http://webhook-gateway:5000/webhook; + proxy_pass http://smee2:5000/webhook; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -169,7 +169,7 @@ http { # Route the WebSocket connection over the same port location /tunnel { - proxy_pass http://webhook-gateway:5000/ws-tunnel; + proxy_pass http://smee2:5000/tunnel; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; From 0ab6ec9355ad166fd9aeaeb7d90f368b266486b9 Mon Sep 17 00:00:00 2001 From: evan Date: Sat, 25 Jul 2026 15:21:35 -0700 Subject: [PATCH 3/5] capture alias in nginx regex --- nginx.conf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nginx.conf b/nginx.conf index cb4c36756..3b362324d 100644 --- a/nginx.conf +++ b/nginx.conf @@ -159,21 +159,23 @@ http { } # Route GitHub Webhooks to the gateway - location /webhook { - proxy_pass http://smee2:5000/webhook; + location ~ ^/webhook/(?.*)$ { 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_pass http://smee2:5000/webhook/$alias; } # Route the WebSocket connection over the same port - location /tunnel { - proxy_pass http://smee2:5000/tunnel; + location ~ ^/tunnel/(.*)$ { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; + + proxy_pass http://smee2:5000/tunnel/$alias; } #Load balancer From 4d476ba82373cfe51333ba45da37488cbaaa315f Mon Sep 17 00:00:00 2001 From: evan Date: Sat, 25 Jul 2026 15:23:20 -0700 Subject: [PATCH 4/5] upstream smee2 --- nginx.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nginx.conf b/nginx.conf index 3b362324d..271f34575 100644 --- a/nginx.conf +++ b/nginx.conf @@ -26,6 +26,10 @@ http { server cleezy-app:8000; } + upstream smee2 { + server smee2:5000; + } + server { #re-routing http to https server listen 80 default_server; @@ -165,7 +169,7 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_pass http://smee2:5000/webhook/$alias; + proxy_pass http://smee2/webhook/$alias; } # Route the WebSocket connection over the same port @@ -175,7 +179,7 @@ http { proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; - proxy_pass http://smee2:5000/tunnel/$alias; + proxy_pass http://smee2/tunnel/$alias; } #Load balancer From 2f81d21cfaae1b4011caad7b631b36779ec8b40d Mon Sep 17 00:00:00 2001 From: evan Date: Sun, 26 Jul 2026 17:50:17 -0700 Subject: [PATCH 5/5] location ~ ^/tunnel/(?.*)$ --- nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index 271f34575..86d3c2b6d 100644 --- a/nginx.conf +++ b/nginx.conf @@ -173,7 +173,7 @@ http { } # Route the WebSocket connection over the same port - location ~ ^/tunnel/(.*)$ { + location ~ ^/tunnel/(?.*)$ { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade";