From c982522426924048ca493ce3e090a2015aaf4a5c Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Mon, 11 Nov 2024 12:08:52 +0330 Subject: [PATCH] fix(nginx): update 404 response for secret locations to include custom message --- .../nginx/templates/location.d/54-region-secret.conf.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nginx/etc/nginx/templates/location.d/54-region-secret.conf.template b/packages/nginx/etc/nginx/templates/location.d/54-region-secret.conf.template index ba62bfd9..0b525835 100644 --- a/packages/nginx/etc/nginx/templates/location.d/54-region-secret.conf.template +++ b/packages/nginx/etc/nginx/templates/location.d/54-region-secret.conf.template @@ -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.