mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-11-05 10:46:10 +08:00
Implement Permissions-Policy header (#282)
* Implement Permissions-Policy header * Bump copyright year Co-authored-by: Matt (IPv4) Cowley <me@mattcowley.co.uk>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2020 DigitalOcean
|
||||
Copyright 2021 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
@@ -37,6 +37,9 @@ export default (domains, global) => {
|
||||
if (global.security.contentSecurityPolicy.computed)
|
||||
config.push(['add_header Content-Security-Policy', `"${global.security.contentSecurityPolicy.computed}" always`]);
|
||||
|
||||
if (global.security.permissionsPolicy.computed)
|
||||
config.push(['add_header Permissions-Policy', `"${global.security.permissionsPolicy.computed}" always`]);
|
||||
|
||||
// Every domain has HSTS enabled, and they all have same hstsSubdomains/hstsPreload settings
|
||||
if (commonHsts(domains)) {
|
||||
const commonHSTSSubdomains = domains.length && domains[0].https.hstsSubdomains.computed;
|
||||
|
||||
Reference in New Issue
Block a user