Disable DNS prefetching
This commit is contained in:
parent
a66ef1059b
commit
b9a180b154
1 changed files with 2 additions and 0 deletions
|
@ -305,6 +305,8 @@ func New(e *echo.Echo, options *Options) (*Server, error) {
|
||||||
// `style-src 'unsafe-inline'` is required for e-mails with
|
// `style-src 'unsafe-inline'` is required for e-mails with
|
||||||
// embedded stylesheets
|
// embedded stylesheets
|
||||||
ectx.Response().Header().Set("Content-Security-Policy", "default-src 'self'; style-src 'self' 'unsafe-inline'")
|
ectx.Response().Header().Set("Content-Security-Policy", "default-src 'self'; style-src 'self' 'unsafe-inline'")
|
||||||
|
// DNS prefetching has privacy implications
|
||||||
|
ectx.Response().Header().Set("X-DNS-Prefetch-Control", "off")
|
||||||
return next(ectx)
|
return next(ectx)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue