diff --git a/README.md b/README.md index 6b6231c..abe0f7e 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,11 @@ Online nginx configuration generator. * … * unified (`nginx.conf`) / modularized file structure (ideal for multi-domain environment) * security headers + * `X-Frame-Options` + * `X-XSS-Protection` + * `X-Content-Type-Options` + * `Referrer-Policy` + * `Content-Security-Policy` * `worker_processes` * `user` * `pid` diff --git a/public/assets/js/app.js b/public/assets/js/app.js index 9692d50..2669acc 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -58,6 +58,9 @@ file_structure: 'unified', + referrer_policy: 'no-referrer-when-downgrade', + content_security_policy: 'default-src * \'unsafe-eval\' \'unsafe-inline\'', + worker_processes: 'auto', user: 'www-data', pid: '/run/nginx.pid', @@ -270,8 +273,12 @@ return $scope.isPHP() && $scope.data.wordpress; }; + $scope.isCSP = function() { + return !!$scope.data.content_security_policy; + }; + $scope.isAccessLog = function() { - return $scope.data.access_log; + return !!$scope.data.access_log; }; $scope.isGzip = function() { diff --git a/public/index.html b/public/index.html index 4de2e35..7156bb8 100644 --- a/public/index.html +++ b/public/index.html @@ -125,58 +125,89 @@ -
+
+ +
+
+
+
+
+
+
PHP
+
+ +
+
+
+
+ + +
+
+
+
+ + +
+
-
- - -
-
- - + +
+
+ + +
-
- - +
+
+ + +
- -
- - +
+ +
-
- - +
+ +
@@ -184,7 +215,7 @@
- diff --git a/public/templates/conf/_general.conf.html b/public/templates/conf/_general.conf.html index b3c45b4..e831847 100644 --- a/public/templates/conf/_general.conf.html +++ b/public/templates/conf/_general.conf.html @@ -3,6 +3,10 @@ add_header X-Frame-Options "SAMEORIGIN" always; add_header X-XSS-Protection "1; mode=block" always; add_header X-Content-Type-Options "nosniff" always; add_header X-UA-Compatible "IE=Edge" always; +add_header Referrer-Policy "{{ data.referrer_policy }}" always; +add_header Content-Security-Policy "{{ data.content_security_policy }}" always; # . files location ~ /\. {