瀏覽代碼

Disable DNS prefetching

master
Simon Ser 4 年之前
父節點
當前提交
b9a180b154
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: FDE7BE0E88F5E48
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. +2
    -0
      server.go

+ 2
- 0
server.go 查看文件

@@ -305,6 +305,8 @@ func New(e *echo.Echo, options *Options) (*Server, error) {
// `style-src 'unsafe-inline'` is required for e-mails with
// embedded stylesheets
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)
}
})


Loading…
取消
儲存