Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the CSP headers if they are set as an env variable at startup #15

Merged
merged 4 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions apache2/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,10 @@ for dir in \
chmod 1777 "$dir";
done

# Add the CSP policy header if it has been set in the environment
if [[ -v HTTPD_CSP ]]; then
echo "Header always set Content-Security-Policy \"${HTTPD_CSP}\"" >> /etc/apache2/security.conf
fi

danakim marked this conversation as resolved.
Show resolved Hide resolved
# Start Apache2
apache2 -D FOREGROUND
1 change: 0 additions & 1 deletion apache2/conf/security.conf
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,3 @@ RequestHeader unset Proxy early
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet