Skip to content

Instantly share code, notes, and snippets.

@peterjaap
Last active November 13, 2022 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterjaap/0df13090afd5012818a58b8adb1b4cbe to your computer and use it in GitHub Desktop.
Save peterjaap/0df13090afd5012818a58b8adb1b4cbe to your computer and use it in GitHub Desktop.
Nginx rules for security.txt on Hypernode
# ~/nginx/server.security-txt
# Make Magento 2.4.x's security.txt available to the world
rewrite ^/.well-known/security.txt$ /securitytxt/index/securitytxt last;
rewrite ^/security.txt$ /securitytxt/index/securitytxt last;
# ~/nginx/server.security-txt-magento23
# Running Magento 2.3.x? Create your own security.txt and store it (for example) in /data/web/security.txt
location ~ ^/security.txt$ {
add_header Content-Type text/plain;
alias /data/web/security.txt;
}
location = /.well-known/security.txt {
add_header Content-Type text/plain;
alias /data/web/security.txt;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment