Skip to content

Commit

Permalink
Apply Docker fix patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Morb0 committed May 6, 2024
1 parent 0fbb04a commit 13e2045
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion SS14.Admin/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,20 @@ public void ConfigureServices(IServiceCollection services)
options.Scope.Add("openid");
options.Scope.Add("profile");
options.GetClaimsFromUserInfoEndpoint = true;
// Frontier-Patch-Start: Docker patch - https://github.com/Morb0/robust-docker/blob/master/ss14-admin-dockerify.patch
options.NonceCookie.SameSite = SameSiteMode.None;
options.NonceCookie.SecurePolicy = CookieSecurePolicy.Always;
options.CorrelationCookie.SameSite = SameSiteMode.None;
options.CorrelationCookie.SecurePolicy = CookieSecurePolicy.Always;

options.Events.OnRedirectToIdentityProvider = async ctx =>
{
if (ctx.ProtocolMessage.RedirectUri.StartsWith("http://"))
ctx.ProtocolMessage.RedirectUri =
ctx.ProtocolMessage.RedirectUri.Replace("http://", "https://");
await Task.FromResult(0);
};
// Frontier-Patch-End

options.Events.OnTokenValidated = async ctx =>
{
Expand Down Expand Up @@ -113,7 +127,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
}

app.UseAuthentication();
app.UseHttpsRedirection();
// app.UseHttpsRedirection(); // Frontier-Patch
app.UseStaticFiles();

app.UseRouting();
Expand Down

0 comments on commit 13e2045

Please sign in to comment.