Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/nginx/templates/site.erb

Issue 29465608: #1574 - Update template syntax in nginx module (Closed)
Patch Set: Created June 14, 2017, 12:39 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/nginx/templates/nginx.conf.erb ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/nginx/templates/site.erb
===================================================================
--- a/modules/nginx/templates/site.erb
+++ b/modules/nginx/templates/site.erb
@@ -9,16 +9,16 @@
<% server_name = lambda do |domain, alt_names| %><%= domain %><% @alt_names.each do |name| %>, <%= name %><% end %><% end %>
-<% if global_config %>
+<% if @global_config %>
<%= @global_config %>
<% end %>
<% if @certificate and @private_key %>
server
{
- server_name <% server_name[domain, alt_names] %>;
+ server_name <% server_name[@domain, @alt_names] %>;
- <% if is_default %>
+ <% if @is_default %>
listen 80 default_server;
listen [::]:80 default_server;
<% else %>
@@ -33,9 +33,9 @@
}
server
{
- server_name <% server_name[domain, alt_names] %>;
+ server_name <% server_name[@domain, @alt_names] %>;
- <% if is_default %>
+ <% if @is_default %>
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
<% else %>
@@ -43,17 +43,17 @@
listen [::]:443 ssl http2;
<% end %>
- ssl_certificate <%= certificate %>;
- ssl_certificate_key <%= private_key %>;
+ ssl_certificate <%= @certificate %>;
+ ssl_certificate_key <%= @private_key %>;
ssl_dhparam /etc/nginx/dhparam.pem;
add_header Strict-Transport-Security max-age=31536000;
<% else %>
server
{
- server_name <% server_name[domain, alt_names] %>;
+ server_name <% server_name[@domain, @alt_names] %>;
- <% if is_default %>
+ <% if @is_default %>
listen 80 default_server;
listen [::]:80 default_server;
<% else %>
@@ -62,7 +62,7 @@
<% end %>
<% end %>
-access_log /var/log/nginx/<%= log %> <%= log_format %>;
+access_log /var/log/nginx/<%= @log %> <%= @log_format %>;
# redirect server error pages to the static page /50x.html
#
@@ -88,10 +88,10 @@
}
<% if @content %>
- <%= content %>
+ <%= @content %>
<% end %>
<% if @source %>
- <% include_file[source] %>
+ <% include_file[@source] %>
<% end %>
}
« no previous file with comments | « modules/nginx/templates/nginx.conf.erb ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld