fix(nginx): 支持 Docker DNS 动态解析并关闭绝对重定向#70
Open
jianyun8023 wants to merge 4 commits into
Open
Conversation
…der to avoid a 502 error from Nginx caused by restarting the bff_service. Disabling absolute redirects will prevent workflow redirection failures when ports other than 8081 are used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
当前 nginx 配置中上游服务直接通过固定服务名代理。服务容器重启或 IP 变化后,如 bff、workflow 等,nginx 会继续使用旧解析结果,导致代理请求出现 502。
同时,在使用非 8081 端口访问时,nginx 默认绝对重定向(
absolute_redirect)会带出不符合外部访问入口的地址,影响 Workflow 页面 301 跳转。改动内容
nginx:1.27->nginx:1.27.3127.0.0.11upstream + resolvezone和keepaliveabsolute_redirect off/vega/、/jaeger/中基于变量的延迟解析写法,统一使用 upstream影响范围
验证
风险说明