What is the proper way to parameterize the domain name in nginx additional directives?
I'd like to apply the CSP to multiple domains without having to customize each domain. I'd like to parameterize the domain.tld value in the code above ie something like $domain. Additionally how would I append www. to it such as: "www.$domain"?
Thank you so much for your time...
Code:
add_header Content-Security-Policy "default-src 'none'; script-src 'self' https://www.google-analytics.com/; style-src 'self' https://fonts.googleapis.com; img-src 'self' https://www.google-analytics.com; font-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com; frame-src 'self'; frame-ancestors 'none'; form-action 'none'; upgrade-insecure-requests; block-all-mixed-content; reflected-xss block; base-uri domain.tld www.domain.tld; referrer no-referrer-when-downgrade";
I'd like to apply the CSP to multiple domains without having to customize each domain. I'd like to parameterize the domain.tld value in the code above ie something like $domain. Additionally how would I append www. to it such as: "www.$domain"?
Thank you so much for your time...