Skip to content

Commit

Permalink
Merge pull request #62 from alphagov/add-hsts-to-unknown-url
Browse files Browse the repository at this point in the history
Add HTTP Strict-Transport-Security header to unknown URLs
  • Loading branch information
MahmudH authored Feb 22, 2024
2 parents 65e097d + d843f88 commit 88e5231
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/www/www.vcl.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ sub vcl_miss {
}

sub vcl_deliver {
set resp.http.Strict-Transport-Security = "max-age=31536000; preload";

# GOV.UK accounts
if (resp.http.GOVUK-Account-End-Session) {
add resp.http.Set-Cookie = "__Host-govuk_account_session=; secure; httponly; samesite=lax; path=/; max-age=0";
Expand Down

0 comments on commit 88e5231

Please sign in to comment.