fix: update backend service configuration for correct host and API proxy path
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 22s
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 22s
This commit is contained in:
@@ -76,7 +76,7 @@ After=network.target
|
||||
[Service]
|
||||
User=$USER_ROOT
|
||||
WorkingDirectory=$BACKEND_DIR
|
||||
ExecStart=$BACKEND_DIR/venv/bin/uvicorn src.main:app --host 0.0.0.0 --port 8000
|
||||
ExecStart=$BACKEND_DIR/venv/bin/uvicorn src.main:app --host 127.0.0.1 --port 8000
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
@@ -107,11 +107,16 @@ server {
|
||||
|
||||
# Backend API
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_pass http://127.0.0.1:8000/api/;
|
||||
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;
|
||||
|
||||
# Websocket support if needed
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade \$http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
}
|
||||
EOL
|
||||
|
||||
Reference in New Issue
Block a user