使用node.js中的反向代理将http/2请求路由到https服务

使用node.js中的反向代理将http/2请求路由到https服务,node.js,https,reverse-proxy,aws-api-gateway,http2,Node.js,Https,Reverse Proxy,Aws Api Gateway,Http2,在过去的几天里,我一直在努力配置一个反向代理,该代理以http/2格式接收来自Internet的请求,并以https格式访问AWS API网关中的服务。 我一直在尝试使用红鸟,但我无法使它工作。 在这里看到的代码中,我试图将http/2中的localhost请求路由到AWS S3 bucket以显示png文件。因此,当我在浏览器中输入url时,系统会将其路由到S3并显示文件。这当然不会发生 var proxy = require('redbird')({ port: 3000, ssl: {

在过去的几天里,我一直在努力配置一个反向代理,该代理以http/2格式接收来自Internet的请求,并以https格式访问AWS API网关中的服务。 我一直在尝试使用红鸟,但我无法使它工作。 在这里看到的代码中,我试图将http/2中的localhost请求路由到AWS S3 bucket以显示png文件。因此,当我在浏览器中输入url时,系统会将其路由到S3并显示文件。这当然不会发生

var proxy = require('redbird')({
port: 3000,
ssl: {
    http2: true,
    port: 3030,
    key: "../certs/mycert.key",
    cert: "../certs/mycert.csr"
}
});

proxy.register("localhost", "https://s3.amazonaws.com", {ssl: true});
以下是我在控制台中看到的错误:

{“name”:“redbird”,“hostname”:“Eleanor.local”,“pid”:2016,“level”:50,“err”:{“message”:“140736110211904:错误:140A1175:SSL例程:SSL_字节到_密码列表:不适当的回退:../deps/openssl/SSL/SSL/SSL_lib.c:1575:\n”,“name”:“error”,“stack”:“错误:140736110211904:错误:140A1175:SSL例程:SSL字节到密码列表:不适当的回退:../deps/openssl/openssl/SSL/SSL/SSL\u lib.c:1575:\n”},“msg”:“HTTPS客户端错误”,“时间”:“2017-10-06T12:01:35.849Z”,“v”:0}” {“name”:“redbird”,“hostname”:“Eleanor.local”,“pid”:2016,“level”:50,“err”:{“message”:“140736110211904:error:1408A0C1:SSL例程:ssl3_get_client_hello:无共享密码:../deps/openssl/openssl/SSL/s3_srvr.c:1427:\n”,“name”:“error”,“stack”:”错误:140736110211904:错误:1408A0C1:SSL例程:ssl3_get_client_hello:无共享密码:../deps/openssl/openssl/SSL/s3_srvr.c:1427:\n“}”,msg:“HTTPS客户端错误”,“时间”:“2017-10-06T12:01:53.062Z”,“v”:0} {“name”:“redbird”,“hostname”:“Eleanor.local”,“pid”:2016,“level”:50,“err”:{“message”:“140736110211904:error:1408A0C1:SSL例程:ssl3_get_client_hello:无共享密码:../deps/openssl/openssl/SSL/s3_srvr.c:1427:\n”,“name”:“error”,“stack”:”错误:140736110211904:错误:1408A0C1:SSL例程:ssl3_get_client_hello:无共享密码:../deps/openssl/openssl/SSL/s3_srvr.c:1427:\n“}”,msg:“HTTPS客户端错误”,“时间”:“2017-10-06T12:01:53.064Z”,“v”:0} {“name”:“redbird”,“hostname”:“Eleanor.local”,“pid”:2016,“level”:50,“err”:{“message”:“140736110211904:错误:140A1175:SSL例程:SSL_字节到_密码列表:不适当的回退:../deps/openssl/SSL/SSL/SSL_lib.c:1575:\n”,“name”:“error”,“stack”:”错误:140736110211904:错误:140A1175:SSL例程:SSL字节到密码列表:不适当的回退:../deps/openssl/openssl/SSL/SSL/SSL\u lib.c:1575:\n“}”,msg:“HTTPS客户端错误”,“时间”:“2017-10-06T12:01:53.066Z”,“v”:0}

我做错什么了吗? 如果有更好的恢复代理模块,请随时为节点建议另一个恢复代理模块

谢谢


GA

您是否尝试过访问?是否在浏览器或控制台中的任何位置收到错误消息?是的,尝试了localhost:3000。我将在控制台中看到的错误添加到问题中。您是否尝试过访问?是否在浏览器或控制台中的任何位置收到错误消息?是的,尝试了localhost:3000。我添加了e我在控制台中看到问题的错误。