From 517dd29a76827a08119b349a8d45c9596719a5c7 Mon Sep 17 00:00:00 2001 From: Zach Wolfenbarger Date: Mon, 9 Sep 2024 16:56:20 -0500 Subject: [PATCH 1/2] Add fe-root production to zoo ingress --- kubernetes/ingress/zooniverse.org.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kubernetes/ingress/zooniverse.org.yaml b/kubernetes/ingress/zooniverse.org.yaml index b0a826b..cf85a46 100644 --- a/kubernetes/ingress/zooniverse.org.yaml +++ b/kubernetes/ingress/zooniverse.org.yaml @@ -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: From 63bd2338267047c5c4248a3b0042299210377d94 Mon Sep 17 00:00:00 2001 From: Zach Wolfenbarger Date: Mon, 9 Sep 2024 17:01:06 -0500 Subject: [PATCH 2/2] fe-content-pages --> fe-root --- nginx-fem-redirects.conf | 20 ++++++++++---------- nginx-fem-staging-redirects.conf | 22 ++++++++++------------ 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/nginx-fem-redirects.conf b/nginx-fem-redirects.conf index d1bd734..b7e09a5 100644 --- a/nginx-fem-redirects.conf +++ b/nginx-fem-redirects.conf @@ -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)/.+?$ { @@ -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; } diff --git a/nginx-fem-staging-redirects.conf b/nginx-fem-staging-redirects.conf index ce66c9c..be573c1 100644 --- a/nginx-fem-staging-redirects.conf +++ b/nginx-fem-staging-redirects.conf @@ -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 @@ -14,17 +12,17 @@ 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; @@ -32,11 +30,11 @@ location ~* ^/(?:_next|assets)/.+?$ { 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; }