commit | 807225bb024154a399bcfe1a3b2bb34c31f27131 | [log] [tgz] |
---|---|---|
author | Akron <nils@diewald-online.de> | Wed Jan 13 18:00:13 2021 +0100 |
committer | Akron <nils@diewald-online.de> | Thu Jan 28 12:15:08 2021 +0100 |
tree | 1b47210c8ba47ec6c956616d2a9173e595a73e0f | |
parent | 1bee5a48cecf17105556103d908a737526f6539d [diff] |
Send 'nosniff' header (fixes #97) Change-Id: If9670a66a9402da77616a362ceda8ea47aceaa75
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm index a6c136e..6a6a7cf 100644 --- a/lib/Kalamar.pm +++ b/lib/Kalamar.pm
@@ -108,6 +108,12 @@ }); }; + $self->hook( + before_dispatch => sub { + shift->res->headers->header('X-Content-Type-Options' => 'nosniff'); + } + ); + $conf->{proxy_host} //= 1; # Take proxy host