mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-07 10:14:13 -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 Kyoo.Models;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.SpaServices.AngularCli;
|
using Microsoft.AspNetCore.SpaServices.AngularCli;
|
||||||
using Microsoft.EntityFrameworkCore;
|
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.
|
// This method gets called by the runtime. Use this method to add services to the container.
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
|
services.Configure<CookiePolicyOptions>(options =>
|
||||||
|
{
|
||||||
|
options.MinimumSameSitePolicy = SameSiteMode.Lax;
|
||||||
|
});
|
||||||
|
|
||||||
// In production, the Angular files will be served from this directory
|
// In production, the Angular files will be served from this directory
|
||||||
services.AddSpaStaticFiles(configuration =>
|
services.AddSpaStaticFiles(configuration =>
|
||||||
{
|
{
|
||||||
@ -67,7 +73,6 @@ namespace Kyoo
|
|||||||
.AddAspNetIdentity<User>()
|
.AddAspNetIdentity<User>()
|
||||||
.AddDeveloperSigningCredential();
|
.AddDeveloperSigningCredential();
|
||||||
|
|
||||||
|
|
||||||
services.AddScoped<ILibraryManager, LibraryManager>();
|
services.AddScoped<ILibraryManager, LibraryManager>();
|
||||||
services.AddScoped<ICrawler, Crawler>();
|
services.AddScoped<ICrawler, Crawler>();
|
||||||
services.AddSingleton<ITranscoder, Transcoder>();
|
services.AddSingleton<ITranscoder, Transcoder>();
|
||||||
@ -104,6 +109,8 @@ namespace Kyoo
|
|||||||
return next();
|
return next();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.UseCookiePolicy();
|
||||||
|
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
if (!env.IsDevelopment())
|
if (!env.IsDevelopment())
|
||||||
app.UseSpaStaticFiles();
|
app.UseSpaStaticFiles();
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 34f828af246b0c86c53f612bd7999a4c2b3e266d
|
Subproject commit a0c75642302151caf6fc0c616305f569cc6557e5
|
Loading…
x
Reference in New Issue
Block a user