From 8e1d7e0aeea945cad7e527210aed6816ba35e350 Mon Sep 17 00:00:00 2001 From: Andrew Dover Date: Thu, 5 Mar 2026 18:27:45 -0800 Subject: [PATCH 1/4] Location directives for sound endpoint --- nginx.conf | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/nginx.conf b/nginx.conf index 23566b65a..a63677c5d 100644 --- a/nginx.conf +++ b/nginx.conf @@ -116,10 +116,19 @@ http { return 404 "oops! we couldnt load your interview question lol, i guess this ones free!"; } - #Load balancer - location /api { - proxy_pass http://mainendpoints; + location ~ ^/sound$ { + return 302 $scheme://$http_host/sound/$is_args$args; } + + location ~ ^/sound/$ { + proxy_set_header X-API-KEY $http_x_api_key; + proxy_pass http://mic-monitering-server.sce; + } + + location ~ ^/sound(/.*)?$ { + proxy_pass http://mic-monitering-server.sce; + } + location / { proxy_pass http://webserver; } From df32f5392458cfba6d641debdba7484d69d2d2be Mon Sep 17 00:00:00 2001 From: Andrew Dover Date: Thu, 5 Mar 2026 18:44:38 -0800 Subject: [PATCH 2/4] Location directives for sound endpoint --- nginx.conf | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index 23566b65a..b370389c4 100644 --- a/nginx.conf +++ b/nginx.conf @@ -116,7 +116,19 @@ http { return 404 "oops! we couldnt load your interview question lol, i guess this ones free!"; } - #Load balancer + location ~ ^/sound$ { + return 302 $scheme://$http_host/sound/$is_args$args; + } + + location ~ ^/sound/$ { + proxy_set_header X-API-KEY $http_x_api_key; + proxy_pass http://mic-monitering-server.sce; + } + + location ~ ^/sound(/.*)?$ { + proxy_pass http://mic-monitering-server.sce; + } + location /api { proxy_pass http://mainendpoints; } From 1db8b87ac97a9bcf074a8d79e63986fd84f051da Mon Sep 17 00:00:00 2001 From: Andrew Dover Date: Fri, 6 Mar 2026 12:03:36 -0800 Subject: [PATCH 3/4] Spelling correction --- nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx.conf b/nginx.conf index a3597858a..76ab65d41 100644 --- a/nginx.conf +++ b/nginx.conf @@ -122,11 +122,11 @@ http { location ~ ^/sound/$ { proxy_set_header X-API-KEY $http_x_api_key; - proxy_pass http://mic-monitering-server.sce; + proxy_pass http://mic-monitoring-server.sce; } location ~ ^/sound(/.*)?$ { - proxy_pass http://mic-monitering-server.sce; + proxy_pass http://mic-monitoring-server.sce; } location /api { From fb26718b9c9428dacb582e9d9a806a2df490fa48 Mon Sep 17 00:00:00 2001 From: Evan Ugarte <36345325+evanugarte@users.noreply.github.com> Date: Sat, 7 Mar 2026 09:17:07 -0800 Subject: [PATCH 4/4] Update nginx.conf --- nginx.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index 76ab65d41..131353927 100644 --- a/nginx.conf +++ b/nginx.conf @@ -132,7 +132,6 @@ http { location /api { proxy_pass http://mainendpoints; } - location / { proxy_pass http://webserver; }