Skip to content

Commit

Permalink
add caching for hot routes
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Feb 26, 2019
1 parent 8dacfeb commit 3493903
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/nginx.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,15 @@ http {

location /favicon.ico {
alias /app/static-root/favicon.ico;
add_header Cache-Control "max-age=604800, public"; # 604800 is 7 days
}

location /downloads/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
add_header Cache-Control "max-age=604800, public"; # 604800 is 7 days
proxy_pass http://app_server/downloads/;
}

location / {
Expand Down

0 comments on commit 3493903

Please sign in to comment.