[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-deployment] 02/02: apikey auth for demo
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-deployment] 02/02: apikey auth for demo |
Date: |
Mon, 05 Feb 2018 13:34:50 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository deployment.
commit 95870c95930ed0decd6d12dfae849a310e24f5cd
Author: Florian Dold <address@hidden>
AuthorDate: Mon Feb 5 13:34:00 2018 +0100
apikey auth for demo
---
etc/nginx/sites-enabled/demo.site | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/etc/nginx/sites-enabled/demo.site
b/etc/nginx/sites-enabled/demo.site
index 70e0a2d..7017a24 100644
--- a/etc/nginx/sites-enabled/demo.site
+++ b/etc/nginx/sites-enabled/demo.site
@@ -81,10 +81,25 @@ server {
server_name backend.demo.taler.net;
include conf.d/talerssl;
- location / {
+ location /public {
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Forwarded-Host "backend.test.taler.net";
+ proxy_set_header X-Forwarded-Proto "https";
proxy_pass http://unix:/home/demo/sockets/merchant.http:/;
+ }
+
+ location / {
+ # match the ApiKey part ignoring case, and the actual key
+ # with case-sensitivity on.
+ if ($http_authorization !~ "(?i)ApiKey (?-i)sandbox") {
+ return 401;
+ }
proxy_redirect off;
proxy_set_header Host $host;
+ proxy_set_header X-Forwarded-Host "backend.test.taler.net";
+ proxy_set_header X-Forwarded-Proto "https";
+ proxy_pass http://unix:/home/demo/sockets/merchant.http:/;
}
}
--
To stop receiving notification emails like this one, please contact
address@hidden