From 22a991ff66e9e11178adf1742300356ec3b24d23 Mon Sep 17 00:00:00 2001 From: Kyle Brandt Date: Wed, 12 Jun 2019 13:15:50 +0200 Subject: [PATCH] middleware: add security related HTTP(S) response headers (#17522) * x_xss_protection * strict_transport_security (HSTS) * x_content_type_options these are currently defaulted to false (off) until the next minor release. fixes #17509 (cherry picked from commit 599514ad680a713b35226ac9aaddb971901c5e8e) --- conf/defaults.ini | 25 +++++++++++++++++++ conf/sample.ini | 24 ++++++++++++++++++ docs/sources/installation/configuration.md | 24 ++++++++++++++++++ pkg/middleware/middleware.go | 26 +++++++++++++++++++ pkg/setting/setting.go | 29 ++++++++++++++++------ 5 files changed, 120 insertions(+), 8 deletions(-) diff --git a/conf/defaults.ini b/conf/defaults.ini index 1c114e17cbf..5f1455552aa 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -179,6 +179,31 @@ cookie_samesite = lax # set to true if you want to allow browsers to render Grafana in a ,