fixup! fix(#2245): drop TCP fallback from gateway nginx upstream
This commit is contained in:
parent
32e4c687b8
commit
2ddabdc410
1 changed files with 2 additions and 7 deletions
|
|
@ -90,12 +90,8 @@ fn render(names: &[String], frontend_dir: Option<&str>) -> String {
|
||||||
// legacy prefix-location path keeps the trailing `/` so nginx
|
// legacy prefix-location path keeps the trailing `/` so nginx
|
||||||
// strips `/agent/<name>/` automatically; the named-location
|
// strips `/agent/<name>/` automatically; the named-location
|
||||||
// path strips the prefix via `rewrite` and uses a bare upstream.
|
// path strips the prefix via `rewrite` and uses a bare upstream.
|
||||||
//
|
// When the socket is not yet bound, nginx returns 502, caught by
|
||||||
// Always use the unix socket path. The old TCP fallback
|
// the error_page directive below.
|
||||||
// (`127.0.0.1:<port>`) was removed: agents run in private netns
|
|
||||||
// (always-on isolation) so the host loopback is unreachable from
|
|
||||||
// the gateway's netns. When the socket is not yet bound, nginx
|
|
||||||
// returns 502 which is handled by the error_page directive below.
|
|
||||||
let sock = agent_sockets::socket_path_for(name).display().to_string();
|
let sock = agent_sockets::socket_path_for(name).display().to_string();
|
||||||
let upstream_prefix = format!("http://unix:{sock}:/");
|
let upstream_prefix = format!("http://unix:{sock}:/");
|
||||||
let upstream_bare = format!("http://unix:{sock}:");
|
let upstream_bare = format!("http://unix:{sock}:");
|
||||||
|
|
@ -298,7 +294,6 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn render_uds_upstream_unconditional() {
|
fn render_uds_upstream_unconditional() {
|
||||||
// TCP fallback removed — always UDS regardless of socket marker.
|
|
||||||
let names = vec!["iris".to_owned()];
|
let names = vec!["iris".to_owned()];
|
||||||
let body = render(&names, None);
|
let body = render(&names, None);
|
||||||
// UDS form present
|
// UDS form present
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue