Skip to content

Preserve host through reverse proxy #299

@jezen

Description

@jezen

There are cases when it is desirable to preserve the Host header when implementing a reverse proxy.

Here's how this looks with other popular reverse proxies.

# nginx
proxy_set_header Host $http_host;

# Apache2
ProxyPreserveHost On

In the general case [IIUC], it is desirable to strip the Host header, as keter does. But I think this should be configurable, so I would propose an extension to ReverseProxyConfig such that in keter.yml, you could tell keter not to strip that header by writing something like this:

  - type: reverse-proxy
    reversed-host: localhost
    reversed-port: 3000
    reversed-ssl: false
    reversing-host: sub.domain.com
    preserve-host: true
    ssl:
      key: /etc/letsencrypt/live/domain.com/privkey.pem
      certificate: /etc/letsencrypt/live/domain.com/fullchain.pem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions