Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@refactorjs/http-proxy

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@refactorjs/http-proxy - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

98

dist/index.d.ts

@@ -60,16 +60,16 @@ import * as url from 'url';

method?: string;
protocol?: string | undefined;
hostname?: string | undefined;
socketPath?: string | undefined;
key?: string | undefined;
passphrase?: string | undefined;
pfx?: buffer.Buffer | string | undefined;
cert?: string | buffer.Buffer | Array<string | buffer.Buffer> | undefined;
ca?: string | buffer.Buffer | Array<string | buffer.Buffer> | undefined;
ciphers?: string | undefined;
secureProtocol?: string | undefined;
servername?: string | undefined;
searchParams?: string | url.URLSearchParams | undefined;
pathname?: string | undefined;
path?: string | undefined;
protocol?: string;
hostname?: string;
socketPath?: string;
key?: string;
passphrase?: string;
pfx?: buffer.Buffer | string;
cert?: string | buffer.Buffer | Array<string | buffer.Buffer>;
ca?: string | buffer.Buffer | Array<string | buffer.Buffer>;
ciphers?: string;
secureProtocol?: string;
servername?: string;
searchParams?: string | url.URLSearchParams;
pathname?: string;
path?: string;
}

@@ -94,71 +94,65 @@ interface OutgoingOptions extends ProxyTargetDetailed, followRedirects.FollowOptions<Server.followOptions> {

/** URL string to be parsed with the url module. */
target?: ProxyTarget | undefined;
target?: string | ProxyTarget;
/** URL string to be parsed with the url module. */
forward?: ProxyTargetUrl | undefined;
forward?: string | ProxyTarget;
/** Object to be passed to http(s).request. */
agent?: http.Agent | boolean | undefined;
agent?: http.Agent | boolean;
/** Object to be passed to https.createServer(). */
ssl?: https.ServerOptions | undefined;
ssl?: https.ServerOptions;
/** If you want to proxy websockets. */
ws?: boolean | undefined;
ws?: boolean;
/** Adds x- forward headers. */
xfwd?: boolean | undefined;
xfwd?: boolean;
/** Verify SSL certificate. */
secure?: boolean | undefined;
secure?: boolean;
/** Explicitly specify if we are proxying to another proxy. */
toProxy?: boolean | undefined;
toProxy?: boolean;
/** Specify whether you want to prepend the target's path to the proxy path. */
prependPath?: boolean | undefined;
prependPath?: boolean;
/** Specify whether you want to ignore the proxy path of the incoming request. */
ignorePath?: boolean | undefined;
ignorePath?: boolean;
/** Local interface string to bind for outgoing connections. */
localAddress?: string | undefined;
localAddress?: string;
/** Changes the origin of the host header to the target URL. */
changeOrigin?: boolean | undefined;
changeOrigin?: boolean;
/** specify whether you want to keep letter case of response header key */
preserveHeaderKeyCase?: boolean | undefined;
preserveHeaderKeyCase?: boolean;
/** Basic authentication i.e. 'user:password' to compute an Authorization header. */
auth?: string | undefined;
auth?: string;
/** Rewrites the location hostname on (301 / 302 / 307 / 308) redirects, Default: null. */
hostRewrite?: string | undefined;
hostRewrite?: string;
/** Rewrites the location host/ port on (301 / 302 / 307 / 308) redirects based on requested host/ port.Default: false. */
autoRewrite?: boolean | undefined;
autoRewrite?: boolean;
/** Rewrites the location protocol on (301 / 302 / 307 / 308) redirects to 'http' or 'https'.Default: null. */
protocolRewrite?: string | undefined;
protocolRewrite?: string;
/** rewrites domain of set-cookie headers. */
cookieDomainRewrite?: false | string | {
[oldDomain: string]: string;
} | undefined;
cookieDomainRewrite?: false | string | Record<string, unknown>;
/** rewrites path of set-cookie headers. Default: false */
cookiePathRewrite?: false | string | {
[oldPath: string]: string;
} | undefined;
cookiePathRewrite?: false | string | Record<string, unknown>;
/** specify if you want to remove the secure flag from the cookie */
cookieRemoveSecure?: boolean | undefined;
cookieRemoveSecure?: boolean;
/** allows to merge `set-cookie` headers from passed response and response from target. Default: false. */
mergeCookies?: boolean | undefined;
mergeCookies?: boolean;
/** object with extra headers to be added to target requests. */
headers?: {
[header: string]: string;
} | http.IncomingHttpHeaders | undefined;
headers?: Record<string, unknown> | http.IncomingHttpHeaders;
/** object with extra headers to be added to proxy requests. */
outgoingHeaders?: {
[header: string]: string;
} | http.IncomingHttpHeaders | undefined;
outgoingHeaders?: Record<string, string | number | readonly string[]> | http.IncomingHttpHeaders;
/** Timeout (in milliseconds) when proxy receives no response from target. Default: 120000 (2 minutes) */
proxyTimeout?: number | undefined;
proxyTimeout?: number;
/** */
router?: Record<string, unknown>;
/** Timeout (in milliseconds) for incoming requests */
timeout?: number | undefined;
timeout?: number;
/** Specify whether you want to follow redirects. Default: false */
followRedirects?: followRedirects.FollowOptions<followOptions>;
/** if set to true the web passes will be run even if `selfHandleResponse` is also set to true. */
forcePasses?: boolean | undefined;
forcePasses?: 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 */
selfHandleResponse?: boolean | Function | undefined;
selfHandleResponse?: boolean | Function;
/** if set, this function will be called with three arguments `req`, `proxyReq` and `proxyRes` and should return a Duplex stream, data from the client websocket will be piped through this stream before being piped to the server, allowing you to influence the request data. */
createWsClientTransformStream?: (req: http.IncomingMessage, proxyReq: http.ClientRequest, proxyRes: http.IncomingMessage) => net.Socket | undefined;
createWsClientTransformStream?: (req: http.IncomingMessage, proxyReq: http.ClientRequest, proxyRes: http.IncomingMessage) => net.Socket;
/** if set, this function will be called with three arguments `req`, `proxyReq` and `proxyRes` and should return a Duplex stream, data from the server websocket will be piped through this stream before being piped to the client, allowing you to influence the response data. */
createWsServerTransformStream?: (req: http.IncomingMessage, proxyReq: http.ClientRequest, proxyRes: http.IncomingMessage) => net.Socket | undefined;
createWsServerTransformStream?: (req: http.IncomingMessage, proxyReq: http.ClientRequest, proxyRes: http.IncomingMessage) => net.Socket;
/** Buffer */
buffer?: buffer.Buffer | undefined;
buffer?: buffer.Buffer;
}

@@ -165,0 +159,0 @@ type StartCallback<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse> = (req: TIncomingMessage, res: TServerResponse, target: ProxyTargetUrl) => void;

{
"name": "@refactorjs/http-proxy",
"version": "0.1.0",
"version": "0.1.1",
"description": "http-proxy alternative",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc