Я настроил обратный прокси, чтобы позволить нашему программному обеспечению CD быть полученным доступ через HTTPS.
Это - моя конфигурация:
server {
listen 443;
server_name build.example.com;
ssl_certificate /etc/ssl/certs/example.com.crt;
ssl_certificate_key /etc/ssl/private/example.com.key;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/example.access.log;
location / {
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://localhost:7777;
proxy_read_timeout 90;
proxy_redirect http://localhost:7777 https://build.example.com;
}
location /socket.io/ {
proxy_pass http://localhost:7777;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Я теперь создал GitHub webhook для общения с нашим CD, когда мы продвигаем новые фиксации к GitHub. Но GitHub получает 301 ответ, когда он пытается вызвать webhook.
Запрос на /api/github/webhook
получает 301 ответ перенаправления на /api/github/webhook/
и GitHub не нравится это.
Я не понимаю, почему nginx отправляет тот ответ. Как я могу заставить это отправлять запрос к приложению CD, которое проксируется?