HTTP Path Rewrites

To host Redpanda Console under an HTTP path other than the root path (for example https://my-company.com/redpanda/console), you need to configure this in Redpanda Console. If you host Redpanda Console at a root path (for example under a sub-domain, such as https://console.redpanda.my-company.com), you don’t need to configure HTTP path rewrites.

Configuration

To configure HTTP path rewrites, you must edit the following properties:

  • basePath

  • setBasePathFromXForwardedPrefix

  • stripPrefix

These properties are defined in the server object:

server:
  # basePath is the sub-path under which Console will be hosted.
  # If you have a reverse proxy in front of Console, that sets
  # the `X-Forwarded-Prefix` header and the configuration property
  # setBasePathFromXForwardedPrefix is true, you don't need to set
  # this.
  basePath: ""

  # If true, Console will check the `X-Forwarded-Prefix` header
  # on all incoming requests. If the header is present, its value
  # will be used as path prefix.
  setBasePathFromXForwardedPrefix: true

  # Some reverse proxies, such as Traefik,
  # can remove a prefix from the URL path before forwarding it to
  # downstream services like Console. If a prefix is set, it must be
  # removed at some point before reaching Console's internal routing.
  # We recommend that only one part of the stack removes the
  # prefix. If you are using a reverse proxy that modifies the
  # request path, you should either disable stripPrefix or
  # configure the proxy so it doesn't modify the path of a request.
  stripPrefix: true

Using a reverse proxy

Redpanda Console make’s a request to the connectors endpoint using expand parameters in the query string. If you have a reverse proxy between Redpanda Console and Kafka Connect, make sure that any rewrite rules include these expand parameters. Otherwise, Kafka Connect won’t return the correct details about the connector.

http://<kafka_connect_host>:8083/connectors?expand=info&expand=status