From 70d1208db6c53d38c9bb89a93f6ce702ad49fdab Mon Sep 17 00:00:00 2001 From: Zach Wolfenbarger Date: Tue, 17 Sep 2024 18:02:40 -0500 Subject: [PATCH] Update users regex to allow certain punctuation --- nginx-pfe-redirects.conf | 4 ++-- nginx-pfe-staging-redirects.conf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nginx-pfe-redirects.conf b/nginx-pfe-redirects.conf index 3e5eadf..9da3042 100644 --- a/nginx-pfe-redirects.conf +++ b/nginx-pfe-redirects.conf @@ -17,7 +17,7 @@ location ~ ^/[\w-]+\.(js|css)$ { } # User profile page -location ~* ^/users/[\w-]+/?$ { +location ~* ^/users/[a-zA-Z0-9_\-.]+/?$ { rewrite (?i)\.(jp(e)?g|gif|png|ico|txt|mp(3|4)|webm|og(a|g|m|v|x)|spx|opus|pdf|ttf|tar|gz|tgz|bz2|tbz2|zip)$ https://static.zooniverse.org/$proxy_path$request_uri; resolver 1.1.1.1; @@ -26,7 +26,7 @@ location ~* ^/users/[\w-]+/?$ { } # User specific pages -location ~* ^/users/[\w-]+/((collections|favorites|message)?)/?$ { +location ~* ^/users/[a-zA-Z0-9_\-.]+/((collections|favorites|message)?)/?$ { rewrite (?i)\.(jp(e)?g|gif|png|ico|txt|mp(3|4)|webm|og(a|g|m|v|x)|spx|opus|pdf|ttf|tar|gz|tgz|bz2|tbz2|zip)$ https://static.zooniverse.org/$proxy_path$request_uri; resolver 1.1.1.1; diff --git a/nginx-pfe-staging-redirects.conf b/nginx-pfe-staging-redirects.conf index 585474f..53dfeed 100644 --- a/nginx-pfe-staging-redirects.conf +++ b/nginx-pfe-staging-redirects.conf @@ -17,7 +17,7 @@ location ~ ^/[\w-]+\.(js|css)$ { } # User profile page -location ~* ^/users/[\w-]+/?$ { +location ~* ^/users/[a-zA-Z0-9_\-.]+/?$ { rewrite (?i)\.(jp(e)?g|gif|png|ico|txt|mp(3|4)|webm|og(a|g|m|v|x)|spx|opus|pdf|ttf|tar|gz|tgz|bz2|tbz2|zip)$ https://static.zooniverse.org/$proxy_path$request_uri; resolver 1.1.1.1; @@ -26,7 +26,7 @@ location ~* ^/users/[\w-]+/?$ { } # User specific pages -location ~* ^/users/[\w-]+/((collections|favorites|message)?)/?$ { +location ~* ^/users/[a-zA-Z0-9_\-.]+/((collections|favorites|message)?)/?$ { rewrite (?i)\.(jp(e)?g|gif|png|ico|txt|mp(3|4)|webm|og(a|g|m|v|x)|spx|opus|pdf|ttf|tar|gz|tgz|bz2|tbz2|zip)$ https://static.zooniverse.org/$proxy_path$request_uri; resolver 1.1.1.1;