There is a bunch of ugly logic in the code where we pass along the origin / scheme of the underlying transport. We then use that origin / scheme of the underlying transport to figure out the true scheme of the http push request / request. This is because node-http2 defaults it to https, where it should be implied http over ws and https over wss.
I'd like to simply this code.
Note, the scheme is important because the cache should not cache something for https and then server that response for http.
There is a bunch of ugly logic in the code where we pass along the origin / scheme of the underlying transport. We then use that origin / scheme of the underlying transport to figure out the true scheme of the http push request / request. This is because node-http2 defaults it to https, where it should be implied http over ws and https over wss.
I'd like to simply this code.
Note, the scheme is important because the cache should not cache something for https and then server that response for http.