我正在写一个NodeJS代理,将取代Java Jetty Proxy。我正在使用node-http-proxy。唯一剩下的部分是将原始客户端证书传递给代理服务器。 从我的理解,Java Servlet规范要求一个Servlet容器拉动Client Certificate from an HTTPS request and store that as an attribute on the Http
任何人都可以请解释什么路由器的选项在这段代码中做的。我从博客中获得了这些代码。我试图实现节点http代理。 var http = require('http'),
httpProxy = require('http-proxy');
//
//Leave out the hostnameOnly field this time, or set it to false
因此,我通过node-http-proxy代理我的API请求,原因有几个。 外部API的来源与实际客户端不同,因此Cookie未被正确设置。代理显然运行在同一个原点,所以我想要从API接收响应,并在代理内部更改cookie值以反映正确的来源。 这里是我的当前设置: // Proxy to API server
app.use('/api', (req, res) => {
proxy.