London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
Hi Jonas,
If you want to prevent to access login, edit mode, admin mode completely then I suggest you other simple solution as following:
var publicFront = configuration.GetValue<bool?>("PublicFront");
if (publicFront.GetValueOrDefault(true))
{
app.Use(async (context, requestDelegate) =>
{
if (context.Request.Path.StartsWithSegments("/util", StringComparison.OrdinalIgnoreCase)
|| context.Request.Path.StartsWithSegments("/episerver", StringComparison.OrdinalIgnoreCase))
{
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
await context.Response.WriteAsync("Forbidden: Access Denied");
return;
}
await requestDelegate(context);
});
}
Hi.
Having followed the instructions on https://docs.developers.optimizely.com/content-management-system/docs/decoupled-setup I still have some issues.
Could I remove the login all together?