Skip to content

Commit

Permalink
Set cache headers on /m/, /static/ and /images/ for pydotorg
Browse files Browse the repository at this point in the history
  • Loading branch information
dstufft committed Jan 14, 2015
1 parent eaec1b8 commit a59052e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions salt/pydotorg/config/pydotorg.nginx.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,17 @@ server {

location /m/ {
alias /srv/pydotorg/media/;
add_header Cache-Control "max-age=604800, public"; # 604800 is 7 days
}

location /static/ {
alias /srv/pydotorg/pythondotorg/static-root/;
add_header Cache-Control "max-age=604800, public"; # 604800 is 7 days
}

location /images/ {
alias /srv/pydotorg/pythondotorg/static-root/images/;
add_header Cache-Control "max-age=604800, public"; # 604800 is 7 days
}

location / {
Expand Down

1 comment on commit a59052e

@frankwiles
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm this doesn't seem to be having the desired effect, if you curl -I https://www.python.org/static/js/libs/modernizr.js no Expires or Cache-Control headers are included. I wonder if there isn't something we need to be setting in Fastly itself perhaps?

Please sign in to comment.