import * as _homer0_jimple from '@homer0/jimple'; import { J as Jimpex, D as MiddlewareConnectFn } from '../../index-DAUqbQ6h.js'; import { ExpressMiddleware } from '../../types/express.js'; import '../../types/http.js'; import 'https'; import 'http'; import 'spdy'; import 'node-fetch'; import 'express'; import '../../types/utils.js'; import '@homer0/path-utils'; import '@homer0/simple-logger'; import '@homer0/simple-config'; import '@homer0/events-hub'; /** * The customization options for the middleware. * * @group Middlewares/ForceHTTPS */ type ForceHTTPSOptions = { /** * A list of regular expressions to match routes that should be ignored. * * @default [/^\/service\//] */ ignoredRoutes: RegExp[]; }; /** * A partial version of the {@link ForceHTTPSOptions}, to be used in the constructor and * the middleware creator. * * @group Middlewares/ForceHTTPS */ type ForceHTTPSPartialOptions = Partial; /** * Creates a middleware that forces all the traffic to be through HTTPS. * * @group Middleware Classes * @group Middlewares/ForceHTTPS * @prettierignore */ declare class ForceHTTPS { /** * The customization options. */ protected readonly _options: ForceHTTPSOptions; /** * @param options The options to construct the class. */ constructor(options?: ForceHTTPSPartialOptions); /** * Generates the middleware that redirects the traffic. */ getMiddleware(): ExpressMiddleware; /** * The customization options. */ get options(): Readonly; } /** * Creates the middleware that redirects the traffic to HTTPS. * * @group Middlewares * @group Middlewares/ForceHTTPS */ declare const forceHTTPSMiddleware: _homer0_jimple.ResourceCreator<"middleware", "connect", (options?: ForceHTTPSPartialOptions) => (app: ContainerType) => ExpressMiddleware | undefined, MiddlewareConnectFn>; export { ForceHTTPS, type ForceHTTPSOptions, type ForceHTTPSPartialOptions, forceHTTPSMiddleware };