Skip to content

Commit 1052bf8

Browse files
author
Håkan Ströberg
authored
Release v0.6 (#33)
* Smaller ssl labs picture * Tuning headers after test report by securityheaders.com
1 parent 0d58948 commit 1052bf8

3 files changed

Lines changed: 22 additions & 8 deletions

File tree

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Create and automatically renew website SSL certificates using the free [Let's En
2626

2727
This rating is returned for both domains and sub domains.
2828

29-
![SSL Labs rating](assets/ssl-labs.png)
29+
![SSL Labs rating](assets/ssl-labs-w800.png)
3030

3131
## Table of contents <!-- omit in toc -->
3232

@@ -272,8 +272,11 @@ docker-compose -f docker-compose.dry-run.yml up
272272
Some configurations are provided by the image. Those files are located in the `nginx_conf.d/secure.d` folder.
273273

274274
- `header.conf`
275-
This file contains header properties to handle and trying to prevent hacker attacks.
276-
More about headers [https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/)
275+
This file contains header properties to fine tune the browser security and availability behaviour. Test the settings on [Security Headers](https://securityheaders.com/).
276+
277+
More about headers on site [https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/), or use the links provided inside `header.conf` file.
278+
279+
> :fire: It's highly likely that these properties needs to be changed depending on your, or the hosted sites needs.
277280
278281
- `location.conf`
279282
This file is not used by default by the image but is available for [reverse proxy location blocks](http://nginx.org/en/docs/http/ngx_http_upstream_module.html).

assets/ssl-labs-w800.png

43.6 KB
Loading
Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1-
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
2-
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
3-
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
4-
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
1+
# Change headers to your needs since they will affect the behaviour and access to your sites.
52

6-
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
3+
add_header Content-Security-Policy "default-src 'none'; frame-ancestors 'none'; script-src 'self'; img-src 'self'; style-src 'self'; base-uri 'self'; form-action 'self';";
4+
add_header Permissions-Policy "geolocation=();midi=();notifications=();push=();sync-xhr=();microphone=();camera=();magnetometer=();gyroscope=();speaker=(self);vibrate=();fullscreen=(self);payment=();";
5+
add_header Referrer-Policy strict-origin-when-cross-origin;
6+
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload";
77
add_header X-Frame-Options SAMEORIGIN;
88
add_header X-Content-Type-Options nosniff;
99
add_header X-XSS-Protection "1; mode=block";
10+
11+
### Reference guides ###
12+
13+
# https://webdock.io/en/docs/how-guides/security-guides/how-to-configure-security-headers-in-nginx-and-apache
14+
# https://geekflare.com/http-header-implementation/
15+
# https://content-security-policy.com/examples/nginx/
16+
# https://scotthelme.co.uk/a-new-security-header-referrer-policy/
17+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
18+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
19+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
20+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection

0 commit comments

Comments
 (0)