Interface IStaticFilePreProcessor
Register implementation in DI container as IStaticFilePreProcessor to register component for pre processing of static file requests such as content media. An implementation can for example set headers.
Namespace: EPiServer.Web
Assembly: EPiServer.Cms.AspNetCore.Routing.dll
Version: 12.0.3Syntax
public interface IStaticFilePreProcessor
Properties
Order
Specifies in the order of execution of IStaticFilePreProcessor implementations. Default implemenation that set values according to MediaOptions has order 0, to run after default set a value higher than that.
Declaration
int Order { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
PrepareResponse(StaticFileResponseContext)
Called before body is written. This can be used to set or modify response headers.
Declaration
void PrepareResponse(StaticFileResponseContext staticFileResponseContext)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.StaticFiles.StaticFileResponseContext | staticFileResponseContext | The current context |
Remarks
Current routed content can be accessed from feature IContentRouteFeature