Skip to content

Commit

Permalink
Merge pull request #370 from zooniverse/mock-route-2
Browse files Browse the repository at this point in the history
Serve /mock assets from fe-root
  • Loading branch information
zwolf authored Sep 12, 2024
2 parents 50da373 + 620021d commit 0dc1fd3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
11 changes: 10 additions & 1 deletion nginx-fem-redirects.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ set $fe_content_pages_host "fe-content-pages.zooniverse.org";
set $fe_root_host "fe-root.zooniverse.org";

# Mock route to test per-path query param caching
location /mock {
location /mock {
resolver 1.1.1.1;
proxy_pass $fe_root_uri;
proxy_set_header Host $fe_root_host;

include /etc/nginx/proxy-security-headers.conf;
}

# Mock route, fe-root app data and static files
location ~* ^/mock/(?:_next|assets)/.+?$ {
resolver 1.1.1.1;
proxy_pass $fe_root_uri;
proxy_set_header Host $fe_root_host;
Expand Down
9 changes: 9 additions & 0 deletions nginx-fem-staging-redirects.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ location /mock {
include /etc/nginx/proxy-security-headers.conf;
}

# Mock route, fe-root app data and static files
location ~* ^/mock/(?:_next|assets)/.+?$ {
resolver 1.1.1.1;
proxy_pass $fe_root_uri;
proxy_set_header Host $fe_root_host;

include /etc/nginx/proxy-security-headers.conf;
}

# Project app data and static files
location ~* ^/projects/(?:_next|assets)/.+?$ {
resolver 1.1.1.1;
Expand Down

0 comments on commit 0dc1fd3

Please sign in to comment.