From a7ebe3b2aedc61bd39c43a19cd0667df10dc6102 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 4 Jun 2018 19:30:43 -0500 Subject: [PATCH] roles/gitea: Add HTTP -> HTTPS redirect --- roles/gitea/files/gitea.httpd.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/gitea/files/gitea.httpd.conf b/roles/gitea/files/gitea.httpd.conf index f4d6b83..3af69c2 100644 --- a/roles/gitea/files/gitea.httpd.conf +++ b/roles/gitea/files/gitea.httpd.conf @@ -1,3 +1,12 @@ +# vim: set ft=apache : + +RewriteEngine On +RewriteCond %{HTTPS} !on +RewriteRule /.* https://%{SERVER_NAME}$0 + +Header always set \ + Strict-Transport-Security "max-age=63072000; includeSubDomains" + ProxyPreserveHost On ProxyRequests Off ProxyPass / http://localhost:3000/