diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2016-04-01 16:54:59 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2016-04-01 18:05:27 +0200 |
commit | d7ccaa19467cd4281989ac2f59ee2f20acbdc4e1 (patch) | |
tree | f66683fd6930fe593713a9a07e015a34a47e5874 /roles/git/files/etc | |
parent | 22562f7dd530aba9b6832f927cf2d5027f41e17d (diff) |
Set a CSP on the webmail, website/wiki and list manager.
Diffstat (limited to 'roles/git/files/etc')
-rw-r--r-- | roles/git/files/etc/nginx/sites-available/git | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/git/files/etc/nginx/sites-available/git b/roles/git/files/etc/nginx/sites-available/git index fbbbb48..ca5555e 100644 --- a/roles/git/files/etc/nginx/sites-available/git +++ b/roles/git/files/etc/nginx/sites-available/git @@ -1,52 +1,52 @@ server { listen 80; listen [::]:80; server_name git.fripost.org; include snippets/acme-challenge.conf; - include snippets/headers.conf; access_log /var/log/nginx/git.access.log; error_log /var/log/nginx/git.error.log info; location / { return 301 https://$host$request_uri; } } server { listen 443; listen [::]:443; server_name git.fripost.org; include snippets/ssl.conf; - include snippets/headers.conf; ssl_certificate /etc/nginx/ssl/git.fripost.org.pem; ssl_certificate_key /etc/nginx/ssl/git.fripost.org.key; access_log /var/log/nginx/git.access.log; error_log /var/log/nginx/git.error.log info; + include snippets/headers.conf; + location ^~ /static/ { alias /usr/share/cgit/; expires 30d; } # Bypass the CGI to return static files stored on disk. Try first repo with # a trailing '.git', then without. location ~* "^/((?U)[^/]+)(?:\.git)?/objects/(?:[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(?:pack|idx))$" { root /var/lib/gitolite/repositories; try_files /$1.git/objects/$2 /$1/objects/$2 =404; expires 30d; gzip off; # TODO honor git-daemon-export-ok } # disallow push over HTTP/HTTPS location ~* "^/[^/]+/git-receive-pack$" { return 403; } location ~* "^/[^/]+/(?:HEAD|info/refs|objects/info/[^/]+|git-upload-pack)$" { gzip off; |