nginx - Nginx proxy_pass alert handshake failure:SSL
问题描述
i have an nginx server behind a GKE ingress as a backend to serve static content (angular).
i was trying to make a route on the nginx itself to route traffic to another external service (cloud function).
when doing it with redirects like the following:
server {
listen 8080;
server_name main-app.example.com
location /service {
return 307 https://cloud-function-url.example.com$request_uri;
}
}
it basically works, and my angular app redirect the request of /service to the cloud function url and assuming i have cors enabled on this cloud function all works.
i wanted to do the same while proxying the request instead of redirecting it, to eliminate the cors hook. so i've tried to update the location directive to :
location /service {
proxy_pass http://cloud-function-url.example.com;
}
this fails on SSL issue with the error
routines:ssl3_read_bytes:sslv3 alert handshake failure:SSL alert number 40) while SSL handshaking to upstream
i've tried many suggestion regarding setting specific headers without luck. i feel i'm missing something basic. any help will be appriciated.
10x
解决方案
我通过将路由设置为不同的公共 url 解决了这个问题,该公共 url 是云运行 url 而不是云 dns(自定义域)。10倍
推荐阅读
- ibm-mq - IBM MQ 配置
- angular - 角度从 5 升级到 6 导致错误
- c# - 集成测试 C# WebAPI asp.NET Framework 4.6.1
- lg - 在旧翻盖手机 LG B460 上编程操作系统
- java - 您可以将作用域代理与 Spring Boot 2 @ConfigurationProperties 一起使用吗?
- firebase - FIREBASE 警告:使用未指定的索引。考虑在 /Tasks 添加 ".indexOn": "assignedTo/dynamicID/ldap" 以获得更好的性能
- c# - 如何将 Google Cloud Data loss Prevention 与 asp.net 连接
- c# - 将 int 数组传递给存储过程的表值参数 - 转换失败
- angular - Angular:将本地图像(资产文件夹)绑定到来自 API 的名称
- amazon-web-services - 是否可以通过 Amazon SNS 发送图像