fix cookie policy
This commit is contained in:
parent
71eda6aeb9
commit
8c7ff74194
@ -61,7 +61,6 @@ namespace WebhookClient
|
|||||||
app.UseExceptionHandler("/Error");
|
app.UseExceptionHandler("/Error");
|
||||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||||
}
|
}
|
||||||
app.UseAuthentication();
|
|
||||||
app.Map("/check", capp =>
|
app.Map("/check", capp =>
|
||||||
{
|
{
|
||||||
capp.Run(async (context) =>
|
capp.Run(async (context) =>
|
||||||
@ -92,12 +91,20 @@ namespace WebhookClient
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Fix samesite issue when running eShop from docker-compose locally as by default http protocol is being used
|
||||||
|
// Refer to https://github.com/dotnet-architecture/eShopOnContainers/issues/1391
|
||||||
|
app.UseCookiePolicy(new CookiePolicyOptions { MinimumSameSitePolicy = SameSiteMode.Lax });
|
||||||
|
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
app.UseSession();
|
app.UseSession();
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
|
app.UseAuthentication();
|
||||||
|
app.UseAuthorization();
|
||||||
app.UseEndpoints(endpoints =>
|
app.UseEndpoints(endpoints =>
|
||||||
{
|
{
|
||||||
endpoints.MapDefaultControllerRoute();
|
endpoints.MapDefaultControllerRoute();
|
||||||
|
endpoints.MapRazorPages();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user