From d24c3e815e6fc7f0d4f58e14073086ebcc096fd6 Mon Sep 17 00:00:00 2001 From: Martin Lowe <martin.lowe@eclipse-foundation.org> Date: Mon, 17 Mar 2025 15:16:49 -0400 Subject: [PATCH] fix(nginx): Remove unneeded election candidate URL mapping from conf file --- config/nginx/default.conf | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/config/nginx/default.conf b/config/nginx/default.conf index cc32e249..678c8c16 100644 --- a/config/nginx/default.conf +++ b/config/nginx/default.conf @@ -1,15 +1,3 @@ -# Has to be outside of server blocks by convention - for elections rewrites 2025 -map $arg_id $id_new_destination { - 'corsaro' /org/elections/2025/corsaro; - 'ebbers' /org/elections/2025/ebbers; - 'khouzam' /org/elections/2025/khouzam; - 'koenigseder' /org/elections/2025/koenigseder; - 'lambert' /org/elections/2025/lambert; - 'matheis' /org/elections/2025/matheis; - 'merks' /org/elections/2025/merks; - 'piana' /org/elections/2025/piana; -} - server { listen 8080; server_name localhost; @@ -18,21 +6,6 @@ server { error_page 404 /404.html; error_page 403 /404.html; - # Needs to be outside of location blocks due to special mapping - location /org/elections/candidate.php { - error_page 420 = @id_redirects; - - if ( $args ~ "id=" ) { return 420; } - return 301 /org/elections/nominees; - } - - location @id_redirects { - if ($id_new_destination) { - return 301 $id_new_destination; - } - return 301 /org/elections/nominees; - } - location / { # Configure redirect for /resources but omit /resources/marketplace if ($request_uri ~ ^/resources/(?!marketplace)(.*)$) { @@ -262,6 +235,9 @@ server { location = /org/elections/nominees.php { return 301 https://$host/org/elections/nominees; } + location = /org/elections/candidate.php { + return 301 https://$host/org/elections/nominees; + } location = /org/elections/election_process.php { return 301 https://$host/org/elections/election-process; } -- GitLab