summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-01-30 00:25:32 +0100
committerFlorian Dold <florian.dold@gmail.com>2018-01-30 00:25:32 +0100
commit06bc7c4de7e40a362562df514d88a98e251f4b13 (patch)
tree9eaee2f683d92b69948a077ce3f7ddb8d7dd0095
parent2307a32df2f23371085d32483796986f58df04f8 (diff)
downloaddeployment-06bc7c4de7e40a362562df514d88a98e251f4b13.tar.gz
deployment-06bc7c4de7e40a362562df514d88a98e251f4b13.tar.bz2
deployment-06bc7c4de7e40a362562df514d88a98e251f4b13.zip
make ApiKey part case insensitive
-rw-r--r--etc/nginx/sites-enabled/test.site4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/nginx/sites-enabled/test.site b/etc/nginx/sites-enabled/test.site
index 8420010..bc2a5ca 100644
--- a/etc/nginx/sites-enabled/test.site
+++ b/etc/nginx/sites-enabled/test.site
@@ -223,7 +223,9 @@ server {
error_page 419 = @green;
recursive_error_pages on;
- if ($http_authorization != "ApiKey sandbox") {
+ # match the ApiKey part ignoring case, and the actual key
+ # with case-sensitivity on.
+ if ($http_authorization !~ "(?i)ApiKey (?-i)sandbox") {
return 401;
}