commit dbe476150be19b74f837de13c406a42f80b3e251 parent e4b7fb5c0f1af893135295e7770f844b2a5983da Author: Marcello Stanisci <marcello.stanisci@inria.fr> Date: Tue, 30 May 2017 16:50:12 +0200 fix redirection for 'demo' Diffstat:
| M | etc/nginx/sites-enabled/demo.site | | | 9 | ++++++++- |
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git 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; + }