Skip to content

Commit

Permalink
Refactor Nginx configuration to remove commented out code and improve…
Browse files Browse the repository at this point in the history
… readability
  • Loading branch information
drikusroor committed Apr 15, 2024
1 parent 57bd9f3 commit 1de7a0b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ server {
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_hide_header Set-Cookie; # Ensuring no cookies for cached pages
# proxy_hide_header Set-Cookie; # Ensuring no cookies for cached pages
}

# Customize caching behavior for potentially dynamic content
location ~* ^/header/ {
proxy_pass http://brazil-blog-web:8000;
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_no_cache $cookie_session; # Avoid caching if session cookie is set
proxy_cache_bypass $cookie_session;
}
# location ~* ^/header/ {
# proxy_pass http://brazil-blog-web:8000;
# 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_no_cache $cookie_session; # Avoid caching if session cookie is set
# proxy_cache_bypass $cookie_session;
# }
}

0 comments on commit 1de7a0b

Please sign in to comment.