From c4c7e17f1933194784f7bbf3f07cc746e4b58d1d Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Wed, 1 Aug 2018 23:19:36 +0100 Subject: [PATCH] Set "AllowEncodedSlashes on" in vhost templates This is required to properly support handling requests for project by name, where the name may contain encoded slashes. For example, GET /v1/projects/openstack-infra%2Fstoryboard causes Apache to give a 404 error without this patch. Change-Id: Ibe95dbfc28621574bac7e4af78fe1d913fa4e1b6 --- templates/storyboard_http.vhost.erb | 2 ++ templates/storyboard_https.vhost.erb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/templates/storyboard_http.vhost.erb b/templates/storyboard_http.vhost.erb index 7020bc8..524adad 100644 --- a/templates/storyboard_http.vhost.erb +++ b/templates/storyboard_http.vhost.erb @@ -4,6 +4,8 @@ <% end %> ServerName <%= scope.lookupvar("storyboard::application::hostname") %> + AllowEncodedSlashes on + DocumentRoot <%= scope.lookupvar("storyboard::application::www_root") %> WSGIDaemonProcess storyboard user=<%= scope.lookupvar("storyboard::params::user") %> group=<%= scope.lookupvar("storyboard::params::group") %> threads=5 python-path=/usr/local/lib/python2.7/dist-packages diff --git a/templates/storyboard_https.vhost.erb b/templates/storyboard_https.vhost.erb index 9e24526..15ce048 100644 --- a/templates/storyboard_https.vhost.erb +++ b/templates/storyboard_https.vhost.erb @@ -48,6 +48,8 @@ # MSIE 7 and newer should be able to use keepalive BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown + AllowEncodedSlashes on + DocumentRoot <%= scope.lookupvar("storyboard::application::www_root") %> WSGIDaemonProcess storyboard user=<%= scope.lookupvar("storyboard::params::user") %> group=<%= scope.lookupvar("storyboard::params::group") %> threads=5 python-path=/usr/local/lib/python2.7/dist-packages