Skip to content

Commit

Permalink
Always route /projects to FEM on frontend.preview (#378)
Browse files Browse the repository at this point in the history
* Always route /projects to FEM on frontend.preview

* Remove deprecated redirects file
  • Loading branch information
zwolf authored Sep 18, 2024
1 parent 9a5f1ad commit 664e9d3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 97 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ADD nginx-proxy-security-headers.conf /etc/nginx/proxy-security-headers.conf
ADD nginx-fem-project-redirects.conf /etc/nginx/fem-project-redirects.conf
ADD nginx-pfe-redirects.conf /etc/nginx/pfe-redirects.conf
ADD nginx-pfe-staging-redirects.conf /etc/nginx/pfe-staging-redirects.conf
ADD nginx-fem-staging-redirects.conf /etc/nginx/fem-staging-redirects.conf
ADD nginx-s3-proxy-headers.conf /etc/nginx/s3-proxy-headers.conf
ADD nginx-az-proxy-headers.conf /etc/nginx/az-proxy-headers.conf
ADD sites/ /etc/nginx/sites/
96 changes: 0 additions & 96 deletions nginx-fem-staging-redirects.conf

This file was deleted.

9 changes: 9 additions & 0 deletions sites/frontend.preview.zooniverse.org.conf
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ server {
return 301 /projects/laac-lscp/maturity-of-baby-sounds$1$2$is_args$query_string;
}

# Use a preferential prefix to route all projects to FEM
location ^~ /projects {
resolver 1.1.1.1;
proxy_pass $fe_project_uri;
proxy_set_header Host $fe_project_host;

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

# fe-root staging app
location / {
resolver 1.1.1.1;
Expand Down

0 comments on commit 664e9d3

Please sign in to comment.