koa-http2-proxy
Advanced tools
Comparing version 0.0.2 to 0.0.3
# Changelog | ||
## [v0.0.3](https://github.com/ontola/koa-http2-proxy/releases/tag/v0.0.3) | ||
- add protocol option | ||
- correctly set x-forwarded-proto header | ||
## [v0.0.2](https://github.com/ontola/koa-http2-proxy/releases/tag/v0.0.2) | ||
- add onUpgrade callback | ||
@@ -5,0 +11,0 @@ |
{ | ||
"name": "koa-http2-proxy", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Configure http2-proxy middleware with ease for koa.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -259,8 +259,9 @@ # koa-http2-proxy | ||
- **option.onUpgrade**: function, called before upgrading a websocket connection. | ||
```javascript | ||
onUpgrade: async (ctx) => { | ||
// add session middleware to the websocket connection | ||
// see option.app | ||
await session(ctx, () => {}); | ||
} | ||
onUpgrade: async ctx => { | ||
// add session middleware to the websocket connection | ||
// see option.app | ||
await session(ctx, () => {}); | ||
}; | ||
``` | ||
@@ -274,2 +275,3 @@ | ||
- **option.changeOrigin**: true/false, Default: false - changes the origin of the host header to the target URL | ||
- **option.protocol**: Agent protocol ('http' or 'https'). Defaults to 'http' | ||
- **option.proxyTimeout**: timeout (in millis) when proxy receives no response from target | ||
@@ -276,0 +278,0 @@ - **option.proxyName**: Proxy name used for Via header |
37148
351