You are the request. Watch where the letter gets opened, and who checks each ID.
The default. The ALB opens the letter, reads the path, and passes Go a postcard inside the VPC. One certificate, and only the browser checks it.
The target group protocol matches what Go speaks: HTTP.
The ALB sends a postcard to :443, but Go only accepts sealed letters on that port. Go replies 400: “Client sent an HTTP request to an HTTPS server.” The ALB passes valid target responses on to the browser, errors included.
Go's 400: tested locally with curl. The ALB passing it on: from the ALB troubleshooting docs, not tested on a real ALB.
The ALB sends a postcard to :443, but Go only accepts sealed letters on that port. Go replies 400: “Client sent an HTTP request to an HTTPS server.” The ALB passes valid target responses on to the browser, errors included.
Go's 400: tested locally with curl. The ALB passing it on: from the ALB troubleshooting docs, not tested on a real ALB.
The article's bug. On port 80 the ALB hands Go a sealed letter, but Go only reads postcards and can't open it. The ALB gets nothing usable back, so it returns 502.
The ALB troubleshooting docs list this as a 502 cause: an SSL handshake error when connecting to a target.
Re-encryption. The ALB opens the letter, reads it, then seals a new envelope for Go, so two certificates are in use. The ALB doesn't check Go's, so self-signed works.
ALB target group docs: the ALB doesn't validate target certificates, so self-signed or expired ones work.
Same result as self-signed. The ALB doesn't check Go's ID, so a real certificate makes nothing safer, and you now have renewals to handle.
ALB target group docs: the ALB doesn't validate target certificates, so self-signed or expired ones work.
The browser sends a sealed letter, the NLB hands it to Go unopened, and Go only reads postcards. No load balancer answers, so there is no 502 either; the browser shows its own error.
Error from headless Chrome against a local Go server that speaks plain HTTP.
This time the browser checks Go's ID itself. No trusted CA issued it, so the browser stops at a warning page.
Error from headless Chrome against a local Go server with a self-signed certificate.
Passthrough. The NLB hands the letter to Go unopened and holds no certificate. Because it never reads the path or headers, it can't route by them.
NLB listener docs: a TCP listener forwards traffic without decrypting it.