Skip to content

Commit

Permalink
refactor(nginx): secret region location
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Jan 14, 2024
1 parent 73f9980 commit 358b0bf
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Secret region
# Deny secret locations

location ^~ /$storeRegionSecret/ {
return 444; # close connection without sending a response header.
}

# 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 358b0bf

Please sign in to comment.