From ec383ffeacb809ac8ba6aaef9c22fd98509e6dfd Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 9 Mar 2020 00:21:55 +0100 Subject: [PATCH] Overriding the cookie policy --- Kyoo/Startup.cs | 9 ++++++++- Kyoo/Views/WebClient | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Kyoo/Startup.cs b/Kyoo/Startup.cs index 4a0a4a10..efeb089e 100644 --- a/Kyoo/Startup.cs +++ b/Kyoo/Startup.cs @@ -3,6 +3,7 @@ using Kyoo.Controllers; using Kyoo.Models; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.SpaServices.AngularCli; using Microsoft.EntityFrameworkCore; @@ -24,6 +25,11 @@ namespace Kyoo // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { + services.Configure(options => + { + options.MinimumSameSitePolicy = SameSiteMode.Lax; + }); + // In production, the Angular files will be served from this directory services.AddSpaStaticFiles(configuration => { @@ -67,7 +73,6 @@ namespace Kyoo .AddAspNetIdentity() .AddDeveloperSigningCredential(); - services.AddScoped(); services.AddScoped(); services.AddSingleton(); @@ -104,6 +109,8 @@ namespace Kyoo return next(); }); + app.UseCookiePolicy(); + app.UseStaticFiles(); if (!env.IsDevelopment()) app.UseSpaStaticFiles(); diff --git a/Kyoo/Views/WebClient b/Kyoo/Views/WebClient index 34f828af..a0c75642 160000 --- a/Kyoo/Views/WebClient +++ b/Kyoo/Views/WebClient @@ -1 +1 @@ -Subproject commit 34f828af246b0c86c53f612bd7999a4c2b3e266d +Subproject commit a0c75642302151caf6fc0c616305f569cc6557e5