Backstage
    Preparing search index...

    Interface ProxyConfigAlpha

    http-proxy-middleware proxy config interface.

    interface ProxyConfig {
        agent?: any;
        allowedHeaders?: string[];
        allowedMethods?: string[];
        auth?: string;
        autoRewrite?: boolean;
        buffer?: Stream;
        changeOrigin?: boolean;
        cookieDomainRewrite?: string | false | { [oldDomain: string]: string };
        cookiePathRewrite?: string | false | { [oldPath: string]: string };
        credentials?: "require" | "forward" | "dangerously-allow-unauthenticated";
        followRedirects?: boolean;
        forward?: ProxyTargetUrl;
        headers?: { [header: string]: string };
        hostRewrite?: string;
        ignorePath?: boolean;
        localAddress?: string;
        logLevel?: "debug" | "info" | "warn" | "error" | "silent";
        logProvider?: LogProviderCallback;
        method?: string;
        onClose?: OnCloseCallback;
        onError?: OnErrorCallback;
        onOpen?: OnOpenCallback;
        onProxyReq?: OnProxyReqCallback;
        onProxyReqWs?: OnProxyReqWsCallback;
        onProxyRes?: OnProxyResCallback;
        pathRewrite?:
            | { [regexp: string]: string }
            | ((path: string, req: Request) => string)
            | ((path: string, req: Request) => Promise<string>);
        prependPath?: boolean;
        preserveHeaderKeyCase?: boolean;
        protocolRewrite?: string;
        proxyTimeout?: number;
        reviveRequestBody?: boolean;
        router?:
            | { [hostOrPath: string]: ProxyTarget
            | undefined }
            | ((req: Request) => ProxyTarget | undefined)
            | ((req: Request) => Promise<ProxyTarget | undefined>);
        secure?: boolean;
        selfHandleResponse?: boolean;
        ssl?: any;
        target?: ProxyTarget;
        timeout?: number;
        toProxy?: boolean;
        ws?: boolean;
        xfwd?: boolean;
    }

    Hierarchy

    • Options
      • ProxyConfig
    Index

    Properties

    agent?: any

    Object to be passed to http(s).request.

    allowedHeaders?: string[]
    allowedMethods?: string[]
    auth?: string

    Basic authentication i.e. 'user:password' to compute an Authorization header.

    autoRewrite?: boolean

    Rewrites the location host/ port on (301 / 302 / 307 / 308) redirects based on requested host/ port.Default: false.

    buffer?: Stream

    Buffer

    changeOrigin?: boolean

    Changes the origin of the host header to the target URL.

    cookieDomainRewrite?: string | false | { [oldDomain: string]: string }

    rewrites domain of set-cookie headers.

    cookiePathRewrite?: string | false | { [oldPath: string]: string }

    rewrites path of set-cookie headers. Default: false

    credentials?: "require" | "forward" | "dangerously-allow-unauthenticated"
    followRedirects?: boolean

    Specify whether you want to follow redirects. Default: false

    forward?: ProxyTargetUrl

    URL string to be parsed with the url module.

    headers?: { [header: string]: string }

    object with extra headers to be added to target requests.

    hostRewrite?: string

    Rewrites the location hostname on (301 / 302 / 307 / 308) redirects, Default: null.

    ignorePath?: boolean

    Specify whether you want to ignore the proxy path of the incoming request.

    localAddress?: string

    Local interface string to bind for outgoing connections.

    logLevel?: "debug" | "info" | "warn" | "error" | "silent"
    logProvider?: LogProviderCallback
    method?: string

    Explicitly set the method type of the ProxyReq

    onClose?: OnCloseCallback
    onError?: OnErrorCallback
    onOpen?: OnOpenCallback
    onProxyReq?: OnProxyReqCallback
    onProxyReqWs?: OnProxyReqWsCallback
    onProxyRes?: OnProxyResCallback
    pathRewrite?:
        | { [regexp: string]: string }
        | ((path: string, req: Request) => string)
        | ((path: string, req: Request) => Promise<string>)
    prependPath?: boolean

    Specify whether you want to prepend the target's path to the proxy path.

    preserveHeaderKeyCase?: boolean

    specify whether you want to keep letter case of response header key

    protocolRewrite?: string

    Rewrites the location protocol on (301 / 302 / 307 / 308) redirects to 'http' or 'https'.Default: null.

    proxyTimeout?: number

    Timeout (in milliseconds) when proxy receives no response from target. Default: 120000 (2 minutes)

    reviveRequestBody?: boolean
    router?:
        | { [hostOrPath: string]: ProxyTarget
        | undefined }
        | ((req: Request) => ProxyTarget | undefined)
        | ((req: Request) => Promise<ProxyTarget | undefined>)
    secure?: boolean

    Verify SSL certificate.

    selfHandleResponse?: boolean

    If set to true, none of the webOutgoing passes are called and it's your responsibility to appropriately return the response by listening and acting on the proxyRes event

    ssl?: any

    Object to be passed to https.createServer().

    target?: ProxyTarget

    URL string to be parsed with the url module.

    timeout?: number

    Timeout (in milliseconds) for incoming requests

    toProxy?: boolean

    Explicitly specify if we are proxying to another proxy.

    ws?: boolean

    If you want to proxy websockets.

    xfwd?: boolean

    Adds x- forward headers.