Try to apply special headers to deploy preview
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
efc8b7df02
commit
7bd37145f1
|
@ -1,5 +1,7 @@
|
||||||
local Volume = { name: 'site', path: '/site' };
|
local Volume = { name: 'site', path: '/site' };
|
||||||
local NetlifyStep(env, prod) = {
|
local NetlifyStep(env) =
|
||||||
|
local prod = env == 'production';
|
||||||
|
{
|
||||||
name: 'netlify deploy ' + env,
|
name: 'netlify deploy ' + env,
|
||||||
image: 'internetmat/drone-netlify',
|
image: 'internetmat/drone-netlify',
|
||||||
volumes: [Volume],
|
volumes: [Volume],
|
||||||
|
@ -11,11 +13,11 @@ local NetlifyStep(env, prod) = {
|
||||||
},
|
},
|
||||||
when: if prod then {
|
when: if prod then {
|
||||||
event: ['promote'],
|
event: ['promote'],
|
||||||
target: ['prod'],
|
target: ['production'],
|
||||||
} else {
|
} else {
|
||||||
target: { exclude: ['prod'] },
|
target: { exclude: ['production'] },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
{
|
{
|
||||||
kind: 'pipeline',
|
kind: 'pipeline',
|
||||||
type: 'docker',
|
type: 'docker',
|
||||||
|
@ -37,7 +39,7 @@ local NetlifyStep(env, prod) = {
|
||||||
'cp -r result/* /site/',
|
'cp -r result/* /site/',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
NetlifyStep('staging', false),
|
NetlifyStep('staging'),
|
||||||
NetlifyStep('prod', true),
|
NetlifyStep('production'),
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
11
netlify.toml
11
netlify.toml
|
@ -46,4 +46,15 @@
|
||||||
allow-popups-to-escape-sandbox
|
allow-popups-to-escape-sandbox
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
[context.deploy-preview]
|
||||||
|
[[headers]]
|
||||||
|
for = "/*"
|
||||||
|
|
||||||
|
[headers.values]
|
||||||
|
Permissions-Policy = "interest-cohort=()"
|
||||||
|
Strict-Transport-Security = "max-age=63072000; includeSubDomains; preload"
|
||||||
|
X-Content-Type-Options = "nosniff"
|
||||||
|
X-Frame-Options = "DENY"
|
||||||
|
Referrer-Policy = "no-referrer"
|
||||||
|
Content-Security-Policy = ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue