jimpex
    Preparing search index...

    Type Alias FastHTMLOptions

    The options to customize the behavior of the middleware.

    type FastHTMLOptions = {
        file: string;
        ignoredRoutes: RegExp[];
        useAppRoutes: boolean;
    }
    Index

    Properties

    file: string

    The name of the file the middleware will serve. If the HTMLGenerator service is available, it will be overridden by the service.

    'index.html'
    
    ignoredRoutes: RegExp[]

    A list of regular expressions to match request paths that should be ignored by the middleware.

    [/\.ico$/i]
    
    useAppRoutes: boolean

    If true, FastHTML will get the list of all the routes controlled by the application, and will use them to validate the incoming requests (in addition to the ignore list): If a request URL doesn't match with any of the "controlled routes", it will serve the HTML file.

    true