Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-4156

Allow request headers inside the directories

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • apache
    • Modules
    • Modules - Engineering Backlog
    • 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 -%>
      
      

      Attachments

        Activity

          People

            eric.putnam Eric Putnam
            psaiz Pablo Saiz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support