Skip to content

Commit

Permalink
Merge pull request #364 from zooniverse/fem-switcheroo-phase-one
Browse files Browse the repository at this point in the history
FEM Switcheroo: Phase One
  • Loading branch information
zwolf authored Sep 10, 2024
2 parents ff76e6e + 63bd233 commit 7f3bea6
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 22 deletions.
10 changes: 10 additions & 0 deletions kubernetes/ingress/zooniverse.org.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,16 @@ spec:
name: zooniverse-org-root-staging
port:
number: 80
- host: fe-root.zooniverse.org
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: zooniverse-org-root-production
port:
number: 80
- host: fe-static.zooniverse.org
http:
paths:
Expand Down
20 changes: 10 additions & 10 deletions nginx-fem-redirects.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set $fe_project_uri "https://fe-project.zooniverse.org";
set $fe_content_pages_uri "https://fe-content-pages.zooniverse.org";
set $fe_root_uri "https://fe-root.zooniverse.org";
set $fe_project_host "fe-project.zooniverse.org";
set $fe_content_pages_host "fe-content-pages.zooniverse.org";
set $fe_root_host "fe-root.zooniverse.org";

# Project app data and static files
location ~* ^/projects/(?:_next|assets)/.+?$ {
Expand All @@ -12,20 +12,20 @@ location ~* ^/projects/(?:_next|assets)/.+?$ {
include /etc/nginx/proxy-security-headers.conf;
}

# About pages data and static files
location ~* ^/about/(?:_next|assets)/.+?$ {
# Zooniverse About pages, prefix match
location /about {
resolver 1.1.1.1;
proxy_pass $fe_content_pages_uri;
proxy_set_header Host $fe_content_pages_host;
proxy_pass $fe_root_uri;
proxy_set_header Host $fe_root_host;

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

# Zooniverse About pages
location ~* ^/about/(?:team|publications)/?$ {
# Zooniverse Get Involved pages, prefix match
location /get-involved {
resolver 1.1.1.1;
proxy_pass $fe_content_pages_uri;
proxy_set_header Host $fe_content_pages_host;
proxy_pass $fe_root_uri;
proxy_set_header Host $fe_root_host;

include /etc/nginx/proxy-security-headers.conf;
}
Expand Down
22 changes: 10 additions & 12 deletions nginx-fem-staging-redirects.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
set $fe_project_uri "https://fe-project.preview.zooniverse.org";
set $fe_content_pages_uri "https://fe-content-pages.preview.zooniverse.org";
set $fe_root_uri "https://fe-root.preview.zooniverse.org";
set $fe_project_host "fe-project.preview.zooniverse.org";
set $fe_content_pages_host "fe-content-pages.preview.zooniverse.org";
set $fe_root_host "fe-root.preview.zooniverse.org";

# Project app data and static files
Expand All @@ -14,29 +12,29 @@ location ~* ^/projects/(?:_next|assets)/.+?$ {
include /etc/nginx/proxy-security-headers.conf;
}

# About pages data and static files
location ~* ^/about/(?:_next|assets)/.+?$ {
# Root app data and static files
location ~* ^/(?:_next|assets)/.+?$ {
resolver 1.1.1.1;
proxy_pass $fe_content_pages_uri;
proxy_set_header Host $fe_content_pages_host;
proxy_pass $fe_root_uri;
proxy_set_header Host $fe_root_host;

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

# Root app data and static files
location ~* ^/(?:_next|assets)/.+?$ {
# Zooniverse About pages
location /about {
resolver 1.1.1.1;
proxy_pass $fe_root_uri;
proxy_set_header Host $fe_root_host;

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

# Zooniverse About pages
location ~* ^/about/(?:team|publications)/?$ {
# Zooniverse Get Involved pages
location /get-involved {
resolver 1.1.1.1;
proxy_pass $fe_content_pages_uri;
proxy_set_header Host $fe_content_pages_host;
proxy_pass $fe_root_uri;
proxy_set_header Host $fe_root_host;

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

0 comments on commit 7f3bea6

Please sign in to comment.