parent
0579ab5b84
commit
b9e6754640
|
@ -47,6 +47,8 @@
|
||||||
cert_type: 'letsencrypt',
|
cert_type: 'letsencrypt',
|
||||||
ssl_profile: 'intermediate',
|
ssl_profile: 'intermediate',
|
||||||
hsts: true,
|
hsts: true,
|
||||||
|
hsts_subdomains: true,
|
||||||
|
hsts_preload: true,
|
||||||
email: '',
|
email: '',
|
||||||
ssl_certificate: '',
|
ssl_certificate: '',
|
||||||
ssl_certificate_key:'',
|
ssl_certificate_key:'',
|
||||||
|
@ -408,6 +410,14 @@
|
||||||
return $scope.isHTTPS() && $scope.data.hsts;
|
return $scope.isHTTPS() && $scope.data.hsts;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.isHSTSSubdomains = function() {
|
||||||
|
return $scope.isHSTS() && $scope.data.hsts_subdomains;
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.isHSTSPreload = function() {
|
||||||
|
return $scope.isHSTSSubdomains() && $scope.data.hsts_preload;
|
||||||
|
};
|
||||||
|
|
||||||
$scope.isResolverCloudflare = function() {
|
$scope.isResolverCloudflare = function() {
|
||||||
return $scope.isHTTPS() && $scope.data.resolver_cloudflare;
|
return $scope.isHTTPS() && $scope.data.resolver_cloudflare;
|
||||||
};
|
};
|
||||||
|
|
|
@ -214,6 +214,14 @@
|
||||||
<input class="form-check-input" type="checkbox" id="hsts" ng-model="data.hsts">
|
<input class="form-check-input" type="checkbox" id="hsts" ng-model="data.hsts">
|
||||||
<label class="form-check-label" for="hsts">enabled</label>
|
<label class="form-check-label" for="hsts">enabled</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-check" ng-if="isHSTS()" ng-class="{ 'input-changed': data.hsts_subdomains !== defaultData.hsts_subdomains }">
|
||||||
|
<input class="form-check-input" type="checkbox" id="hsts_subdomains" ng-model="data.hsts_subdomains">
|
||||||
|
<label class="form-check-label" for="hsts_subdomains"><code>includeSubDomains</code></label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check" ng-if="isHSTSSubdomains()" ng-class="{ 'input-changed': data.hsts_preload !== defaultData.hsts_preload }">
|
||||||
|
<input class="form-check-input" type="checkbox" id="hsts_preload" ng-model="data.hsts_preload">
|
||||||
|
<label class="form-check-label" for="hsts_preload"><code>preload</code></label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<fieldset class="form-group" ng-if="isHTTPS()">
|
<fieldset class="form-group" ng-if="isHTTPS()">
|
||||||
|
|
|
@ -8,7 +8,7 @@ add_header Referrer-Policy "{{ data.referrer_policy }}" always;<!--
|
||||||
add_header Content-Security-Policy "{{ data.content_security_policy }}" always;</span><!--
|
add_header Content-Security-Policy "{{ data.content_security_policy }}" always;</span><!--
|
||||||
|
|
||||||
✔ HSTS--><span ng-if="isHSTS()">
|
✔ HSTS--><span ng-if="isHSTS()">
|
||||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;</span>
|
add_header Strict-Transport-Security "max-age=31536000{{ isHSTSSubdomains() ? '; includeSubDomains' : '' }}{{ isHSTSPreload() ? '; preload' : '' }}" always;</span>
|
||||||
|
|
||||||
# . files
|
# . files
|
||||||
location ~ /\. {
|
location ~ /\. {
|
||||||
|
|
Loading…
Reference in New Issue