Skip to content

Commit

Permalink
lamp: add referrer policy for enhanced privacy
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Sep 16, 2018
1 parent fcbd661 commit 5be7866
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

[v0.59.10](https://github.com/nextcloud/nextcloudpi/commit/e17f56b) (2018-09-04) ncp-web: add hover text for ncp admin header icons
[v0.59.11](https://github.com/nextcloud/nextcloudpi/commit/701dcd6) (2018-09-16) lamp: add referrer policy for enhanced privacy

[v0.59.10](https://github.com/nextcloud/nextcloudpi/commit/fcbd661) (2018-09-04) ncp-web: add hover text for ncp admin header icons

[v0.59.9 ](https://github.com/nextcloud/nextcloudpi/commit/6a755c3) (2018-09-16) nc-prettyURL: fixes

Expand Down
1 change: 1 addition & 0 deletions lamp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ EOF
cat >> /etc/apache2/apache2.conf <<EOF
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
Header always set Referrer-Policy "no-referrer"
</IfModule>
EOF

Expand Down
9 changes: 9 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,15 @@ chmod 770 /var/www/ncp-web
apt-get install -y --no-install-recommends php-imagick imagemagick-6-common
}

# no-origin policy for enhanced privacy
grep -q "Referrer-Policy" /etc/apache2/apache2.conf || {
cat >> /etc/apache2/apache2.conf <<EOF
<IfModule mod_headers.c>
Header always set Referrer-Policy "no-referrer"
</IfModule>
EOF
}

} # end - only live updates

exit 0
Expand Down

0 comments on commit 5be7866

Please sign in to comment.