Here’s what I can see about the layers of HTTP proxying involved:
- The origin server, listening on
$PORT in your container. You can program this to ignore a protocol upgrade and respond with HTTP.
- Some private, probably glitch-specific thing. Evidence suggests that this piece doesn’t support responding to an upgrade request with HTTP. Whatever it does, it makes the next layer unhappy. In non-upgrade HTTP requests, this thing adds
awselb/2.0, which is fairly transparent. It only shows up when anything upstream does something wrong. But it’s unknown if it supports responding to an upgrade request with HTTP.
- The user agent. You can program this to accept HTTP responses.
Side note: another thing that happens is either (2) or (3) replaces custom status messages with the default ones (e.g., “Not Found” for 404). But that’s relatively minor.