mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-11-05 18:56:09 +08:00
Add security.txt (#181)
* Add security.txt * Add security.txt * Update website.conf * Update security label * Add eslint linebreak for windows * Removed backwards compability security.txt encryption * Update .eslintrc.js * Update security component * Change location redirect on security.txt to absolute path * Moved security.txt config into security.conf
This commit is contained in:
@@ -50,6 +50,19 @@ export default (domains, global) => {
|
||||
deny: 'all',
|
||||
}]);
|
||||
|
||||
// Security.txt
|
||||
if (global.security.securityTxt.computed) {
|
||||
config.push(['# security.txt', '']);
|
||||
config.push(['location /security.txt', {
|
||||
return: '301 /.well-known/security.txt',
|
||||
}]);
|
||||
|
||||
// Custom security.txt path
|
||||
config.push(['location = /.well-known/security.txt', {
|
||||
alias: `${global.security.securityTxtPath.value}`,
|
||||
}]);
|
||||
}
|
||||
|
||||
// Done!
|
||||
return config;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user