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

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

Issue 5476360696889344: Added SSL encryption to issue tracker configuration (Closed)
Patch Set: Created March 11, 2014, 8:58 a.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
« modules/trac/manifests/init.pp ('K') | « modules/trac/manifests/init.pp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/trac/templates/site.erb
===================================================================
--- a/modules/trac/templates/site.erb
+++ b/modules/trac/templates/site.erb
@@ -1,18 +1,40 @@
server {
server_name <%= @domain %>;
+
<% if is_default %>
listen 80 default_server;
listen [::]:80 default_server;
<% else %>
listen 80;
listen [::]:80;
<% end %>
+ location / {
+ rewrite (.*) https://$host$1 permanent;
+ }
+}
+
+server {
+ server_name <%= @domain %>;
+
+ <% if is_default %>
+ listen 443 ssl default_server;
+ listen [::]:443 ssl default_server;
+ <% else %>
+ listen 443 ssl;
+ listen [::]:443 ssl;
+ <% end %>
+
+ ssl_certificate adblockplus.org_sslcert.pem;
+ ssl_certificate_key adblockplus.org_sslcert.key;
+
+ add_header Strict-Transport-Security max-age=31536000;
+
location /
{
set $path_info $request_uri;
if ($path_info ~ "(.*?)\?")
{
set $path_info $1;
}
« modules/trac/manifests/init.pp ('K') | « modules/trac/manifests/init.pp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld