ソースを参照

Disable DNS prefetching

master
Simon Ser 4年前
コミット
b9a180b154
この署名に対応する既知のキーがデータベースに存在しません GPGキー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 // `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)
} }
}) })


読み込み中…
キャンセル
保存