mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-23 15:30:34 -04:00
Overriding the cookie policy
This commit is contained in:
parent
30da20a456
commit
ec383ffeac
@ -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<CookiePolicyOptions>(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<User>()
|
||||
.AddDeveloperSigningCredential();
|
||||
|
||||
|
||||
services.AddScoped<ILibraryManager, LibraryManager>();
|
||||
services.AddScoped<ICrawler, Crawler>();
|
||||
services.AddSingleton<ITranscoder, Transcoder>();
|
||||
@ -104,6 +109,8 @@ namespace Kyoo
|
||||
return next();
|
||||
});
|
||||
|
||||
app.UseCookiePolicy();
|
||||
|
||||
app.UseStaticFiles();
|
||||
if (!env.IsDevelopment())
|
||||
app.UseSpaStaticFiles();
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 34f828af246b0c86c53f612bd7999a4c2b3e266d
|
||||
Subproject commit a0c75642302151caf6fc0c616305f569cc6557e5
|
Loading…
x
Reference in New Issue
Block a user