Created
December 18, 2022 22:08
-
-
Save maximebories/961f12101af369804d40d5ec287e562b to your computer and use it in GitHub Desktop.
Github-Page Basic Security
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create the _headers file | |
echo "Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'" > _headers | |
echo "Strict-Transport-Security: max-age=31536000" >> _headers | |
echo "X-Content-Type-Options: nosniff" >> _headers | |
echo "X-Frame-Options: SAMEORIGIN" >> _headers | |
echo "X-XSS-Protection: 1; mode=block" >> _headers | |
# Add the _headers file to the repository and commit the changes | |
git add _headers | |
git commit -m "Add security headers" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment