OLD | NEW |
1 <% include_file = lambda do |url| %> | 1 <% include_file = lambda do |url| %> |
2 <% content = Puppet::FileServing::Content.indirection.find(url) %> | 2 <% content = Puppet::FileServing::Content.indirection.find(url) %> |
3 <% if content %> | 3 <% if content %> |
4 <%= content.content %> | 4 <%= content.content %> |
5 <% else %> | 5 <% else %> |
6 <% raise StandardError, "Failed to resolve source URL #{url}" %> | 6 <% raise StandardError, "Failed to resolve source URL #{url}" %> |
7 <% end %> | 7 <% end %> |
8 <% end %> | 8 <% end %> |
9 | 9 |
10 <% server_name = lambda do |domain, alt_names| %><%= domain %><% @alt_names.each
do |name| %>, <%= name %><% end %><% end %> | 10 <% server_name = lambda do |domain, alt_names| %><%= domain %><% @alt_names.each
do |name| %>, <%= name %><% end %><% end %> |
(...skipping 27 matching lines...) Expand all Loading... |
38 <% if is_default %> | 38 <% if is_default %> |
39 listen 443 ssl http2 default_server; | 39 listen 443 ssl http2 default_server; |
40 listen [::]:443 ssl http2 default_server; | 40 listen [::]:443 ssl http2 default_server; |
41 <% else %> | 41 <% else %> |
42 listen 443 ssl http2; | 42 listen 443 ssl http2; |
43 listen [::]:443 ssl http2; | 43 listen [::]:443 ssl http2; |
44 <% end %> | 44 <% end %> |
45 | 45 |
46 ssl_certificate <%= certificate %>; | 46 ssl_certificate <%= certificate %>; |
47 ssl_certificate_key <%= private_key %>; | 47 ssl_certificate_key <%= private_key %>; |
| 48 ssl_dhparam /etc/nginx/dhparam.pem; |
48 | 49 |
49 add_header Strict-Transport-Security max-age=31536000; | 50 add_header Strict-Transport-Security max-age=31536000; |
50 <% else %> | 51 <% else %> |
51 server | 52 server |
52 { | 53 { |
53 server_name <% server_name[domain, alt_names] %>; | 54 server_name <% server_name[domain, alt_names] %>; |
54 | 55 |
55 <% if is_default %> | 56 <% if is_default %> |
56 listen 80 default_server; | 57 listen 80 default_server; |
57 listen [::]:80 default_server; | 58 listen [::]:80 default_server; |
(...skipping 20 matching lines...) Expand all Loading... |
78 } | 79 } |
79 | 80 |
80 <% if @content %> | 81 <% if @content %> |
81 <%= content %> | 82 <%= content %> |
82 <% end %> | 83 <% end %> |
83 | 84 |
84 <% if @source %> | 85 <% if @source %> |
85 <% include_file[source] %> | 86 <% include_file[source] %> |
86 <% end %> | 87 <% end %> |
87 } | 88 } |
OLD | NEW |