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 18 matching lines...) Expand all Loading... |
29 location / | 29 location / |
30 { | 30 { |
31 rewrite (.*) https://$host$1 permanent; | 31 rewrite (.*) https://$host$1 permanent; |
32 } | 32 } |
33 } | 33 } |
34 server | 34 server |
35 { | 35 { |
36 server_name <% server_name[domain, alt_names] %>; | 36 server_name <% server_name[domain, alt_names] %>; |
37 | 37 |
38 <% if is_default %> | 38 <% if is_default %> |
39 listen 443 ssl spdy default_server; | 39 listen 443 ssl http2 default_server; |
40 listen [::]:443 ssl spdy default_server; | 40 listen [::]:443 ssl http2 default_server; |
41 <% else %> | 41 <% else %> |
42 listen 443 ssl spdy; | 42 listen 443 ssl http2; |
43 listen [::]:443 ssl spdy; | 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 | 48 |
49 add_header Strict-Transport-Security max-age=31536000; | 49 add_header Strict-Transport-Security max-age=31536000; |
50 <% else %> | 50 <% else %> |
51 server | 51 server |
52 { | 52 { |
53 server_name <% server_name[domain, alt_names] %>; | 53 server_name <% server_name[domain, alt_names] %>; |
(...skipping 22 matching lines...) Expand all Loading... |
76 } | 76 } |
77 | 77 |
78 <% if @content %> | 78 <% if @content %> |
79 <%= content %> | 79 <%= content %> |
80 <% end %> | 80 <% end %> |
81 | 81 |
82 <% if @source %> | 82 <% if @source %> |
83 <% include_file[source] %> | 83 <% include_file[source] %> |
84 <% end %> | 84 <% end %> |
85 } | 85 } |
OLD | NEW |