Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -158,6 +162,26 @@ http {
return 404 "oops! we couldnt load your interview question lol, i guess this ones free!";
}

# Route GitHub Webhooks to the gateway
location ~ ^/webhook/(?<alias>.*)$ {
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/webhook/$alias;
}

# Route the WebSocket connection over the same port
location ~ ^/tunnel/(?<alias>.*)$ {
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/tunnel/$alias;
}

#Load balancer
location /api/scevents/ {
resolver 127.0.0.11 valid=15s;
Expand Down
Loading