robur-coop / tlstunnel

A TLS reverse proxy unikernel
36 stars 2 forks source link

add a x-forwarded-for header #26

Open hannesm opened 3 hours ago

hannesm commented 3 hours ago

from https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For, this is a de-factor standard for proxies.

it is pretty simple (well, would be if we'd be doing full HTTP): add a "X-Forwarded-For: " header. It may be simple enough to inject this header (similar to how we do the redirect).

dinosaure commented 3 hours ago

I recently did this for contruno: https://github.com/dinosaure/contruno/pull/31

hannesm commented 3 hours ago

Indeed, related (what you did) is the X-Forwarded-Proto header.