Details
-
Type:
Improvement
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: apache
-
Labels:
-
Template:customfield_10700 163941
-
Team:Modules
-
Sprint:Modules - Engineering Backlog
-
QA Risk Assessment:Needs Assessment
Description
At the moment, it is not possible to define RequestHeader directly inside a directory. It would be nice if a patch like the one at the bottom of this message was applied in the template, so that it accepts also RequestHeader
Note that at the moment, the 'custom_fragment' could be used for this. It would be nicer to have its own syntax, though.
-bash-4.2$ git diff 1.10.0..psaiz_devel
|
diff --git a/templates/vhost/_directories.erb b/templates/vhost/_directories.erb
|
index df2690c..264722e 100644
|
--- a/templates/vhost/_directories.erb
|
+++ b/templates/vhost/_directories.erb
|
@@ -274,6 +274,15 @@
|
<%- end -%>
|
<%- end -%>
|
<%- end -%>
|
+ <% if directory['request_headers'] and ! directory['request_headers'].empty? -%>
|
+ ## Request header rules
|
+ ## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#requestheader
|
+ <%- Array(directory['request_headers']).each do |request_statement| -%>
|
+ <%- if request_statement != '' -%>
|
+ RequestHeader <%= request_statement %>
|
+ <%- end -%>
|
+ <%- end -%>
|
+ <% end -%>
|
<%- if directory['custom_fragment'] -%>
|
<%= directory['custom_fragment'] %>
|
<%- end -%>
|
|