forked from Sarah/Lieb-Website
fixed chrome login
This commit is contained in:
parent
df0170c20d
commit
2fbbe2f3a7
3 changed files with 13 additions and 3 deletions
|
@ -7,6 +7,6 @@
|
|||
},
|
||||
"AllowedHosts": "*",
|
||||
"HttpClients": {
|
||||
"LiebWebsite": "https://lieb.games"
|
||||
"LiebWebsite": "http://lieb-website"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -669,6 +669,7 @@ namespace Lieb.Data
|
|||
if(signup.SignUpType == SignUpType.Maybe && signup.LiebUserId.HasValue)
|
||||
{
|
||||
await SignOff(raid.RaidId, signup.LiebUserId.Value);
|
||||
await _discordService.SendMessageToUsers("You have been signed off because you were still maybe.", raid.Title, new HashSet<ulong>(){signup.LiebUserId.Value});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,11 @@ builder.Services.AddAuthentication(opt =>
|
|||
opt.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
|
||||
opt.DefaultChallengeScheme = DiscordDefaults.AuthenticationScheme;
|
||||
})
|
||||
.AddCookie()
|
||||
.AddCookie(options =>
|
||||
{
|
||||
options.Cookie.HttpOnly = true;
|
||||
options.Cookie.SecurePolicy = CookieSecurePolicy.Always;
|
||||
})
|
||||
.AddDiscord(x =>
|
||||
{
|
||||
x.AppId = builder.Configuration["Discord:AppId"];
|
||||
|
@ -78,6 +82,11 @@ builder.Services.AddHttpClient(Constants.HttpClientName , httpClient =>
|
|||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseCookiePolicy(new CookiePolicyOptions()
|
||||
{
|
||||
MinimumSameSitePolicy = Microsoft.AspNetCore.Http.SameSiteMode.Lax
|
||||
});
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
|
@ -100,7 +109,7 @@ using (var scope = app.Services.CreateScope())
|
|||
DbInitializer.Initialize(context);
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
//app.UseHttpsRedirection();
|
||||
|
||||
app.UseStaticFiles();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue