iShot2021-10-16 00.02.53.png


set the headers X-Forwarded-Host (and perhaps X-Forwarded-Port) on the forwarded request. Jenkins will parse those headers and generate all the redirects and other links on the basis of those headers. Depending on your reverse proxy it may be easier to set X-Forwarded-Host and X-Forwarded-Port to the hostname and port in the original Host header respectively or it may be easier to just pass the original Host header through as X-Forwarded-Host and delete the X-Forwarded-Port # header from the request. You will also need to set the X-Forwarded-Proto header if your reverse proxy is changing from https to http or vice-versa.

意思就是你如果用https的代理http的要设置一个 X-Forwarded-Proto

proxy_set_header X-Forwarded-Proto $scheme;


后来才知道通过配置Remove prefix移除前缀,是指源文件的前缀,真的很好奇歪果仁写这个ssh发布插件的时候怎么想的,操作起来极其古怪
iShot2021-10-16 01.55.26.png


这个要用到jenkins的插件 Git Parameter,在系统配置里面把这个插件装上之后
iShot2021-10-17 15.55.00.png
iShot2021-10-17 15.55.21.png

Last modification:October 17th, 2021 at 03:56 pm
If you think my article is useful to you, please feel free to appreciate