location ~ ^/government/(assets|uploads|placeholder$)/ {
  proxy_set_header Host <%= @whitehall_frontend_host %>;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-Server $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header X-Forwarded-Host $host;
  proxy_pass http://<%= @whitehall_frontend_host %>;

  # Explicitly re-include Strict-Transport-Security header, thus clearing
  # the Cache-Control headers set in the parent server directive.
  include /etc/nginx/sts.conf;
}

location ~ ^/media/ {
  proxy_set_header Host <%= @asset_manager_host %>;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-Server $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header X-Forwarded-Host $host;
  proxy_pass http://<%= @asset_manager_host %>;
}

location ~ ^/government/(assets|uploads|placeholder$)/ {
  proxy_set_header Host <%= @whitehall_frontend_host %>;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-Server $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header X-Forwarded-Host $host;
  proxy_pass http://<%= @whitehall_frontend_host %>;

  # Explicitly re-include Strict-Transport-Security header, this
  # forces nginx not to clear Cache-Control headers further up the
  # stack.
  include /etc/nginx/sts.conf;
}

location ~ ^/media/ {
  proxy_set_header Host <%= @asset_manager_host %>;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-Server $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header X-Forwarded-Host $host;
  proxy_pass http://<%= @asset_manager_host %>;

  # Explicitly re-include Strict-Transport-Security header, this
  # forces nginx not to clear Cache-Control headers further up the
  # stack.
  include /etc/nginx/sts.conf;
}

Add Strict-Transport-Security header for /media requests
Add Strict-Transport-Security header for /media requests
