@cloud-cli/px 3.3.1 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/proxy.js +1 -0
  2. package/package.json +1 -1
package/dist/proxy.js CHANGED
@@ -113,6 +113,7 @@ export class ProxyServer {
113
113
  const proxyRequest = (url.protocol === 'https:' ? httpsRequest : httpRequest)(url, { method: req.method });
114
114
  setHeaders(req, proxyRequest);
115
115
  proxyRequest.setHeader('host', getHost(target));
116
+ proxyRequest.setHeader('x-forwarded-for', req.headers.host);
116
117
  req.on('data', (chunk) => proxyRequest.write(chunk));
117
118
  req.on('end', () => proxyRequest.end());
118
119
  proxyRequest.on('error', (error) => handleError(error, res));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud-cli/px",
3
- "version": "3.3.1",
3
+ "version": "3.4.0",
4
4
  "description": "Reverse Proxy",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",