You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
opt.Get("api/other", c =>c.Action<OtherController>(x =>x.Action1())).WithConstraints(ctx =>{// only allow route to be hit if the predefined header is presentif(context.RouteContext.HttpContext.Request.Headers.ContainsKey("CustomHeader")){returntrue;}returnfalse;});
So basically, avoiding having a constraint class.
The text was updated successfully, but these errors were encountered:
I'd like to see syntax like this:
So basically, avoiding having a constraint class.
The text was updated successfully, but these errors were encountered: