Skip to content

How to use nginx::resource::vhost:add_header ? #899

@leponot

Description

@leponot

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 3.8.7
  • Ruby:
  • Distribution: CentOS 6 / 7
  • Module version: 4.0.0

Hi

sorry i'm a beginer with hiera,
how i can configure nginx::resource::vhost:add_header:

i want to add secure header but i have always this error : is not a hash

from my srv-reverse-01.xxxx.xx.yaml

nginx::nginx_vhosts:
'xxx.xxxx.xx':
proxy: 'xxx.xxxx.xx'
ssl: true
ssl_cert: /etc/pki/tls/certs/xxx.xxxx.xx.crt
ssl_key: /etc/pki/tls/private/xxx.xxxx.xx.key
rewrite_to_https: true
add_header: ??

for this value for example :
add_header X-Frame-Options SAMEORIGIN

templates/vhost/vhost_header.erb
<% if @add_header -%>
<%- @add_header.keys.sort.each do |key| -%>
add_header '<%= key %>' '<%= @add_header[key] %>';
<%- end -%>
<% end -%>

many thanks

regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions