dadatuputi / bitwarden_gcloud

Bitwarden installation optimized for Google Cloud's 'always free' e2-micro compute instance
https://bradford.la/2020/self-host-bitwarden-on-google-cloud/
MIT License
344 stars 79 forks source link

Vaultwarden's IP_HEADER env var is inconsistent #77

Closed asardaes closed 1 year ago

asardaes commented 1 year ago

Likely for historical reasons, the environment for Vaultwarden specifies a custom IP_HEADER env var:

https://github.com/dadatuputi/bitwarden_gcloud/blob/552257c1190e8ad59157b5177bdfecce3441ac0f/docker-compose.yml#L29

However, this setup uses Caddy as the reverse proxy, and that's configured to set the real IP in X-Real-IP:

https://github.com/dadatuputi/bitwarden_gcloud/blob/395333e614ab118138b88a7033767adaaa587ac3/caddy/Caddyfile#L35

So the Compose YAML needs to be adjusted.

dadatuputi commented 1 year ago

Looks like vaultwarden changed that at some time, currently it is set to X-Real-IP (https://github.com/dani-garcia/vaultwarden/blob/efc6eb0073d9740a3bf2dc99e8fe5afd50a2e4e3/.env.template#L61)