feat: update NGINX configuration for improved proxy handling and enable social account login on GET requests
This commit is contained in:
@@ -17,24 +17,24 @@ http {
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 80; # NGINX always listens on port 80 inside the container
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
proxy_pass http://server:8000; # Forward to internal Gunicorn server
|
||||
proxy_set_header Host $host; # Forward Host header from the request
|
||||
proxy_set_header X-Real-IP $remote_addr; # Forward real IP
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # Forward original IP
|
||||
proxy_set_header X-Forwarded-Proto $scheme; # Forward the protocol
|
||||
proxy_set_header X-Forwarded-Host $host; # Forward the Host header
|
||||
proxy_pass http://server:8000; # Explicitly forward to Django service
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
location /static/ {
|
||||
alias /code/staticfiles/;
|
||||
alias /code/staticfiles/; # Serve static files directly
|
||||
}
|
||||
|
||||
location /media/ {
|
||||
alias /code/media/;
|
||||
alias /code/media/; # Serve media files directly
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user