fix: expliciete SNI + HTTP/1.1 naar KVK upstream (v1.7.4)#43
Merged
Conversation
Na v1.7.3 startte nginx wel, maar requests faalden met 502 "upstream prematurely closed connection while reading response header". Root cause: sinds proxy_pass een variabele bevat ($kvk_upstream) leidt Nginx de SNI hostname (proxy_ssl_name) niet meer betrouwbaar af uit proxy_pass. KVK's load balancer ontving een TLS-handshake zonder (of met verkeerde) SNI en sloot de connectie direct na ~60ms. Fix: - proxy_ssl_name $kvk_upstream (expliciete SNI) - proxy_http_version 1.1 (moderne HTTP naar upstream) - proxy_set_header Connection "" (lege Connection zodat keep-alive werkt) Diagnose bevestigd via 4-lagentest: host curl OK, Docker-network curl OK, alleen via gateway 502 -> probleem zat 100% in nginx config. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…1.7.4) Vangt alle recente gateway-regressies af via een contract-test op de gerenderde nginx.conf.template: - proxy_pass gebruikt $kvk_upstream variabele (runtime DNS, v1.7.2) - expliciete proxy_ssl_name voor SNI (v1.7.3) - proxy_http_version 1.1 + lege Connection header - docker resolver + envsubst placeholders fully resolved Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
proxy_ssl_name \$kvk_upstream— expliciete SNI hostname in TLS handshakeproxy_http_version 1.1+ legeConnectionheader — moderne HTTP naar upstream