diff --git a/DiscordBot/appsettings.json b/DiscordBot/appsettings.json index 1c92b11..56d5fc1 100644 --- a/DiscordBot/appsettings.json +++ b/DiscordBot/appsettings.json @@ -7,6 +7,6 @@ }, "AllowedHosts": "*", "HttpClients": { - "LiebWebsite": "https://lieb.games" + "LiebWebsite": "http://lieb-website" } } diff --git a/Lieb/Data/RaidService.cs b/Lieb/Data/RaidService.cs index b4c6111..d50d0c1 100644 --- a/Lieb/Data/RaidService.cs +++ b/Lieb/Data/RaidService.cs @@ -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(){signup.LiebUserId.Value}); } } } diff --git a/Lieb/Program.cs b/Lieb/Program.cs index 5b42b47..09e4877 100644 --- a/Lieb/Program.cs +++ b/Lieb/Program.cs @@ -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();