Skip to content

Commit

Permalink
fix(nginx): update 404 response for secret locations to include custo…
Browse files Browse the repository at this point in the history
…m message
  • Loading branch information
alimd committed Nov 11, 2024
1 parent c10116d commit c982522
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Deny secret locations

location ^~ /$nitrobaseRegionSecret/ {
return 404;
return 404 'SLD'; # secret location denied
}

# Note: The ^~ modifier in Nginx is used to match location blocks against the longest non-regular expression prefix of a requested URI. This means that if a location block with the ^~ modifier is matched, no other location blocks will be considered, even if they have regular expression matches. This prevents the regular expression location blocks from taking precedence over the longer prefix matches.

0 comments on commit c982522

Please sign in to comment.