Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,17 @@ But usually, for cleaner URL, a redirect is preferred.
Administrators wishing to use mod_speling can juse use `use_mod_speling: True` in the definition
of the vhost.

## Security settings

By default, several HTTP headers are set to protect the website. There is currently no way to disable them, but
this will be added if needed. The current settings are:

- Content-Security-Policy, set to "frame-ancestors 'none'"
- X-Frame-Options, set to DENY
- X-Content-Type-Options: nosniff

See https://wiki.mozilla.org/Security/Guidelines/Web_Security for more information.

# Extend the role

In order to compose more complex roles by combining (and using depends), the installed configuration also
Expand Down
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@

- include: mod_speling.yml

- include: various_security.yml

- set_fact:
port: 80

Expand Down
5 changes: 5 additions & 0 deletions tasks/various_security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- name: Install server alias configuration
template:
src: various_security.conf
dest: "{{ _vhost_confdir }}/various_security.conf"
notify: verify config and restart httpd
5 changes: 5 additions & 0 deletions templates/various_security.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://wiki.mozilla.org/Security/Guidelines/Web_Security#X-Frame-Options
Header always set Content-Security-Policy "frame-ancestors 'none'"
Header always set X-Frame-Options "DENY"
# https://wiki.mozilla.org/Security/Guidelines/Web_Security#X-Content-Type-Options
X-Content-Type-Options: nosniff