drupflare/worker - v1.0.4
    Preparing search index...

    Type Alias EdgeRules

    the two appliers edgeRules builds

    type EdgeRules = {
        decorate(pathname: string, res: Response, https?: boolean): Response;
        redirect(url: URL): Response | undefined;
    }
    Index
    • The response with DEFAULT_HEADERS for each header it lacks, so a module's header stays, and then every matching rule's headers set, later rules winning. A rule value of "" removes that header, defaults and module headers included.

      Parameters

      • pathname: string
      • res: Response
      • Optionalhttps: boolean

      Returns Response

    • the redirect response for this URL, or undefined

      Parameters

      • url: URL

      Returns Response | undefined