Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
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?