@bahmutov Related to #215.
This is actually a bug in the underlying request library we use to issue HTTP requests. I've opened an issue here: request/request#2372
request is appending the port to the Host header which causes zeit.co to return a 404 (like all reverse proxies likely will). That's because port should only be appended to the Host header when its not 80 or 443.
You can simulate exactly what request is doing under the hood via curl.
## this will return 404
curl -I https://todomvc-express.bahmutov.com:443/app.css --header 'Host: todomvc-express.bahmutov.com:443'
## this will return 200
curl -I https://todomvc-express.bahmutov.com:443/app.css --header 'Host: todomvc-express.bahmutov.com'
After splunking through request's code I see that if we were to parse out the url ourselves instead of providing as a string, it would work correctly. So we'll do that until they issue a fix.
@bahmutov Related to #215.
This is actually a bug in the underlying
requestlibrary we use to issue HTTP requests. I've opened an issue here: request/request#2372requestis appending theportto theHostheader which causeszeit.coto return a 404 (like all reverse proxies likely will). That's becauseportshould only be appended to theHostheader when its not80or443.You can simulate exactly what
requestis doing under the hood viacurl.After splunking through
request'scode I see that if we were to parse out the url ourselves instead of providing as a string, it would work correctly. So we'll do that until they issue a fix.