commit | 1bee5a48cecf17105556103d908a737526f6539d | [log] [tgz] |
---|---|---|
author | Akron <nils@diewald-online.de> | Wed Jan 13 17:44:18 2021 +0100 |
committer | Akron <nils@diewald-online.de> | Thu Jan 28 12:10:07 2021 +0100 |
tree | 91d6e43afe4a0ca3ef79f883608dbb87f93f8fbc | |
parent | b7b91c55a08d18bb0cd908ceb553ec64b63b8786 [diff] [blame] |
Introduce HSTS header for https_only conf Change-Id: If2aafcda5478cdfc91a65220542e420ca6893e07
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm index 4a2ae7c..a6c136e 100644 --- a/lib/Kalamar.pm +++ b/lib/Kalamar.pm
@@ -81,6 +81,13 @@ # ... for cookie transport $self->sessions->secure(1); + + # For all pages + $self->hook( + before_dispatch => sub { + shift->res->headers->header('Strict-Transport-Security' => 'max-age=3600; includeSubDomains'); + } + ); }; # Run the app from a subdirectory