Skip to content

Commit

Permalink
X-Forwarded-Proto / always
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgriff committed Jan 17, 2025
1 parent 98f99fb commit ff7638f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion GenderPayGap.WebUI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private static void ConfigureServices(IServiceCollection services)
services.AddAntiforgery(
options =>
{
options.Cookie.SecurePolicy = CookieSecurePolicy.None;
options.Cookie.SecurePolicy = CookieSecurePolicy.Always;
});

DataProtectionKeysHelper.AddDataProtectionKeyStorage(services);
Expand Down
5 changes: 5 additions & 0 deletions terraform/cloudfront.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ resource "aws_cloudfront_distribution" "distribution" {
origin_protocol_policy = "http-only"
origin_ssl_protocols = ["TLSv1.2"]
}

custom_header {
name = "X-Forwarded-Proto"
value = "https"
}
}

price_class = "PriceClass_100"
Expand Down

0 comments on commit ff7638f

Please sign in to comment.