Skip to content

Commit 2c72396

Browse files
authored
Merge pull request openedx-unsupported#7165 from openedx/swang/ws-4498-prospectus-cloudflare-cache
feat: stop caching prospectus page-data
2 parents a0d777b + 2f6cd23 commit 2c72396

File tree

1 file changed

+9
-0
lines changed
  • playbooks/roles/nginx/templates/edx/app/nginx/sites-available

1 file changed

+9
-0
lines changed

playbooks/roles/nginx/templates/edx/app/nginx/sites-available/prospectus.j2

+9
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,15 @@ server {
120120
{% endif %}
121121
}
122122

123+
# want to avoid caching app-data.json file as an out-of-date hash leads to the application refreshing
124+
location /page-data/ {
125+
port_in_redirect off;
126+
add_header Cache-Control "no-store, max-age=0";
127+
proxy_pass http://edx-stage-prospectus-static.s3-website-us-east-1.amazonaws.com/71058f2-5803$request_uri;
128+
# Hide client headers from S3 to prevent request headers too big error
129+
proxy_pass_request_headers off;
130+
}
131+
123132
# favicon is requested a lot. cache it at the edge.
124133

125134
location /favicon.ico {

0 commit comments

Comments
 (0)