summaryrefslogtreecommitdiff
path: root/etc/nginx/sites-enabled/demo.site
diff options
context:
space:
mode:
Diffstat (limited to 'etc/nginx/sites-enabled/demo.site')
-rw-r--r--etc/nginx/sites-enabled/demo.site9
1 files changed, 8 insertions, 1 deletions
diff --git a/etc/nginx/sites-enabled/demo.site b/etc/nginx/sites-enabled/demo.site
index 0fa9ed1..e72e87c 100644
--- a/etc/nginx/sites-enabled/demo.site
+++ b/etc/nginx/sites-enabled/demo.site
@@ -6,7 +6,14 @@ server {
shop.demo.taler.net
exchange.demo.taler.net;
- rewrite ^ https://$host$request_uri? permanent;
+ # 301-based ridirects allows the user agent to *change* the
+ # method used in the second request. This breaks all the API
+ # using POST, as some user agents do the second request using
+ # GET. 307 is meant to tell the user agent to not change the
+ # method in the second request.
+ if ($request_method = POST) { return 307 https://$host$request_uri; }
+ return 301 https://$host$request_uri;
+
}