openfaas / of-watchdog

Reverse proxy for STDIO and HTTP microservices
MIT License
259 stars 115 forks source link

Propagate Host header from incoming request to the function. #24

Closed dmrub closed 5 years ago

dmrub commented 5 years ago

Host HTTP header was not propagated to the function because it is not a part of http.Request.Header map.

Signed-off-by: Dmitri Rubinstein dmitri.rubinstein@googlemail.com

Description

Motivation and Context

How Has This Been Tested?

Types of changes

Checklist:

ivanayov commented 5 years ago

Thanks @dmrub

Can you please try to run ./build.sh locally as the build fails?

dmrub commented 5 years ago

I used ./build.sh when modifying and testing and it worked, can you send me your stdout/stderr output ?

alexellis commented 5 years ago

I'm seeing some odd errors in the build log (linked on the button that says Details)

https://travis-ci.org/openfaas-incubator/of-watchdog/builds/414527953?utm_source=github_status&utm_medium=notification

dmrub commented 5 years ago

I was not able to reproduce an error but there was bug in the Travis CI configuration and build.sh script, which I fixed: https://github.com/dmrub/of-watchdog/commit/bd702157a0c7793af05a78bd05350beaaf38efb3 It builds now.

alexellis commented 5 years ago

Hi please can you expand on why the value "language: minimal" was added to the build for Travis?

Was something broken and subsequently fixed?

Alex

alexellis commented 5 years ago

Looks good, but I have an outstanding question on the Travis update.

Please could you raise a similar PR to openfaas/faas?

Thanks,

Alex

alexellis commented 5 years ago

Please can you also follow-up with a couple of unit tests in a new Pull Request that show the behavior?

dmrub commented 5 years ago

About value "language: minimal" that I added to Travis: This was not a fix, but an improvement since Travis, when no language is specified, uses Ruby by default. And because of-watchdog require only docker for building I changed language to minimal for reducing build time.

alexellis commented 5 years ago

Thanks for explaining.. I like that 👍 Maybe it would work for our other repos too?