Setu-TS
    Preparing search index...

    Interface IStaticFiles

    Static files service interface.

    0.1.0

    interface IStaticFiles {
        serve(ctx: IRequestContext): Promise<HandlerResult>;
    }

    Implemented by

    Index
    • Serves the static file addressed by the request context, applying the same conditional-request, Range, and encoding negotiation the mounted routes use — this and the route handler are one implementation, so both honour the plugin's configuration identically.

      Answers 404 rather than throwing when the path resolves to nothing, and when the runtime provides no file system (edge platforms), since a missing asset is a not-found and not an error.

      Parameters

      Returns Promise<HandlerResult>

      The handler result for the resolved file

      0.1.0