1.经过调查,

2down voteaccepted

x-forwarded-for is an HTTP header field, so has nothing to do with the transport layer (TCP). Usually web proxies insert the x-forwarded-for data.

直接把#   option forwardfor       except 127.0.0.0/8  
注释掉重启就行。
2.front和backend

#---------------------------------------------------------------------
frontend main *:5000
mode tcp
acl url_static path_beg -i /static /images /javascript /stylesheets
acl url_static path_end -i .jpg .gif .png .css .js

use_backend app if url_static
default_backend app

#---------------------------------------------------------------------
# login frontend which proxys to the backends harbor login
#---------------------------------------------------------------------
frontend harbor_login
bind *:4430
mode tcp
option tcplog
default_backend harbor_login


#---------------------------------------------------------------------
# round robin balancing between the various backends
#---------------------------------------------------------------------
backend app
mode tcp
balance roundrobin
server app1 172.16.6.50:5000 check

#---------------------------------------------------------------------
# round robin balancing between the various backends
#---------------------------------------------------------------------
backend harbor_login
balance roundrobin
mode tcp
server harbor_login 172.16.6.50:443 check

转载于:https://www.cnblogs.com/hixiaowei/p/9934162.html

GitHub 加速计划 / ha / harbor
23.24 K
4.68 K
下载
Harbor 是一个开源的容器镜像仓库,用于存储和管理 Docker 镜像和其他容器镜像。 * 容器镜像仓库、存储和管理 Docker 镜像和其他容器镜像 * 有什么特点:支持多种镜像格式、易于使用、安全性和访问控制
最近提交(Master分支:2 个月前 )
9e55afbb pull image from registry.goharbor.io instead of dockerhub Update testcase to support Docker Image Can Be Pulled With Credential Change gitlab project name when user changed. Update permissions count and permission count total Change webhook_endpoint_ui Signed-off-by: stonezdj <stone.zhang@broadcom.com> Co-authored-by: Wang Yan <wangyan@vmware.com> 7 天前
3dbfd422 Signed-off-by: wang yan <wangyan@vmware.com> 7 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐