Skip to content

Commit

Permalink
Update users regex to allow certain punctuation (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
zwolf authored Sep 17, 2024
1 parent 9ec57a4 commit 9a5f1ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nginx-pfe-redirects.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions nginx-pfe-staging-redirects.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 9a5f1ad

Please sign in to comment.