robur-coop / tlstunnel

A TLS reverse proxy unikernel
35 stars 2 forks source link

add a x-forwarded-for header #26

Open hannesm opened 1 month ago

hannesm commented 1 month 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 1 month ago

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

hannesm commented 1 month ago

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