EnsureHttpsAttribute
Redirect to the https:// version of this url if not already.
Assembly: ServiceStack.dll
View Source
Declaration
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
public class EnsureHttpsAttribute : RequestFilterAttribute, _Attribute, IHasRequestFilter, IRequestFilterBase
Properties
SkipIfDebugMode
Don't redirect when in DebugMode
View Source
Declaration
public bool SkipIfDebugMode { get; set; }
SkipIfXForwardedFor
Don't redirect if the request was a forwarded request, e.g. from a Load Balancer
View Source
Declaration
public bool SkipIfXForwardedFor { get; set; }
Inherited Properties
ApplyTo
View Source
Declaration
public ApplyTo ApplyTo { get; set; }
Priority
View Source
Declaration
public int Priority { get; set; }
Methods
Execute(IRequest, IResponse, Object)
View Source
Declaration
public override void Execute(IRequest req, IResponse res, object requestDto)
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
ServiceStack.Web.IResponse | res |
System.Object | requestDto |
Inherited Methods
Copy()
Create a ShallowCopy of this instance.
View Source
Declaration
public virtual IRequestFilterBase Copy()
Returns
ServiceStack.Web.IRequestFilterBase
Execute(IRequest, IResponse, Object)
This method is only executed if the HTTP method matches the ServiceStack.RequestFilterAttribute.ApplyTo property.
View Source
Declaration
public abstract void Execute(IRequest req, IResponse res, object requestDto)
Parameters
Type | Name | Description |
---|---|---|
ServiceStack.Web.IRequest | req | The http request wrapper |
| | ServiceStack.Web.IResponse | res | The http response wrapper
|
| System.Object
| requestDto | The request DTO
|
RequestFilter(IRequest, IResponse, Object)
View Source
Declaration
public void RequestFilter(IRequest req, IResponse res, object requestDto)
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
ServiceStack.Web.IResponse | res |
System.Object | requestDto |
Implements
System.Runtime.InteropServices._Attribute
- ServiceStack.Web.IHasRequestFilter
- ServiceStack.Web.IRequestFilterBase