fix: stabilize rule config and cross-review backend
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
目标:
|
||||
|
||||
- 把内网 Collabora `http://10.79.97.17:9980`
|
||||
- 把内网 Collabora `http://172.16.0.58:9980`
|
||||
- 暴露成浏览器可访问的统一入口
|
||||
- 供前端配置为 `http://nas.7bm.co/collabora`
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
## 默认代理关系
|
||||
|
||||
- 浏览器入口:`http://nas.7bm.co/collabora`
|
||||
- 代理目标:`http://10.79.97.17:9980`
|
||||
- 代理目标:`http://172.16.0.58:9980`
|
||||
|
||||
## 启动
|
||||
|
||||
@@ -45,7 +45,7 @@ collabora-proxy ok
|
||||
再验证 Collabora 页面是否被代理出来:
|
||||
|
||||
```bash
|
||||
curl -I http://127.0.0.1:9981/collabora/browser/dist/cool.html
|
||||
curl -I http://127.0.0.1:9981/browser/dist/cool.html
|
||||
```
|
||||
|
||||
如果这一步通了,再让上层网关或宿主 nginx 把:
|
||||
@@ -54,7 +54,28 @@ curl -I http://127.0.0.1:9981/collabora/browser/dist/cool.html
|
||||
|
||||
转发到:
|
||||
|
||||
- `http://<部署该容器的主机>:9981/collabora`
|
||||
- `http://<部署该容器的主机>:9981/`
|
||||
|
||||
推荐外层 nginx:
|
||||
|
||||
```nginx
|
||||
location /collabora/ {
|
||||
proxy_pass http://127.0.0.1:9981/;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_read_timeout 3600s;
|
||||
proxy_send_timeout 3600s;
|
||||
proxy_connect_timeout 60s;
|
||||
}
|
||||
```
|
||||
|
||||
## 前端联动配置
|
||||
|
||||
|
||||
Reference in New Issue
Block a user