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:
William Chang
2020-10-22 22:45:11 +07:00
committed by GitHub
parent b48162a3e2
commit 8bc06372a3
2 changed files with 56 additions and 0 deletions

View File

@@ -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;
};