Openshift上的自定义Ha代理
如何配置路由器的ha代理,以便对传入呼叫的报头进行选择,并可能添加其他传出报头Openshift上的自定义Ha代理,openshift,haproxy,Openshift,Haproxy,如何配置路由器的ha代理,以便对传入呼叫的报头进行选择,并可能添加其他传出报头 我只想为来自特定主机名或具有特定头的调用附加一个新头您可以通过 然后您可以自定义模板,例如通过haproxy配置添加额外的标头。请参阅路由器模板详细信息,并参阅haproxy配置详细信息 # vim haproxy-config.template 自定义后,应使用当前模板替换模板,直至步骤 我希望它能帮助您。您可以通过 然后您可以自定义模板,例如通过haproxy配置添加额外的标头。请参阅路由器模板详细信息,并参阅
我只想为来自特定主机名或具有特定头的调用附加一个新头您可以通过 然后您可以自定义模板,例如通过haproxy配置添加额外的标头。请参阅路由器模板详细信息,并参阅haproxy配置详细信息
# vim haproxy-config.template
自定义后,应使用当前模板替换模板,直至步骤
我希望它能帮助您。您可以通过 然后您可以自定义模板,例如通过haproxy配置添加额外的标头。请参阅路由器模板详细信息,并参阅haproxy配置详细信息
# vim haproxy-config.template
自定义后,应使用当前模板替换模板,直至步骤
我希望它能对您有所帮助。我的配置文件是这样的……让我们假设我们要添加一个新的头,其中包含一个值 所以我只需要添加行:http请求addheader new\u header\u name:value 但是如果我只想在输入中为特定的主机名添加新的头,我该怎么做呢
*frontend public
bind :80
mode http
tcp-request inspect-delay 5s
tcp-request content accept if HTTP
monitor-uri /_______internal_router_healthz
# Strip off Proxy headers to prevent HTTpoxy (https://httpoxy.org/)
http-request del-header Proxy
# DNS labels are case insensitive (RFC 4343), we need to convert the hostname into lowercase
# before matching, or any requests containing uppercase characters will never match.
http-request set-header Host %[req.hdr(Host),lower]
# check if we need to redirect/force using https.
acl secure_redirect base,map_reg(/var/lib/haproxy/conf/os_route_http_redirect.map) -m found
redirect scheme https if secure_redirect
use_backend %[base,map_reg(/var/lib/haproxy/conf/os_http_be.map)]
default_backend openshift_default*
我的配置文件是这样的…让我们假设我们想要添加一个值的新头 所以我只需要添加行:http请求addheader new\u header\u name:value 但是如果我只想在输入中为特定的主机名添加新的头,我该怎么做呢
*frontend public
bind :80
mode http
tcp-request inspect-delay 5s
tcp-request content accept if HTTP
monitor-uri /_______internal_router_healthz
# Strip off Proxy headers to prevent HTTpoxy (https://httpoxy.org/)
http-request del-header Proxy
# DNS labels are case insensitive (RFC 4343), we need to convert the hostname into lowercase
# before matching, or any requests containing uppercase characters will never match.
http-request set-header Host %[req.hdr(Host),lower]
# check if we need to redirect/force using https.
acl secure_redirect base,map_reg(/var/lib/haproxy/conf/os_route_http_redirect.map) -m found
redirect scheme https if secure_redirect
use_backend %[base,map_reg(/var/lib/haproxy/conf/os_http_be.map)]
default_backend openshift_default*