Skip to content

Setting up a reverse proxy

The server automatically handles headers from reverse proxies, without requiring additional setup.

Here are some examples, how you can setup a reverse proxy for different servers:

Caddy
mete.domain.space {
  reverse_proxy localhost:8000
}

Only proxing the image data

You can choose to only proxy image data and static data in general. This can help improve load times for clients, since they don't have to proxy the images. See client documentation for how to setup.

The following paths are important:

  • /static
  • /api/v4/images/{uuid}/raw (contains a uuid, which should be regex-matched)
Caddy
mete.domain.space {
  @target <<CEL
    {method} == "GET"
    && (
      {path}.startsWith("/static") || path_regexp('^/api/v4/images/[0-9a-fA-F-]{36}/raw$')
    )
    CEL
  reverse_proxy @target localhost:8000
}