Skip to content
This repository was archived by the owner on Aug 9, 2025. It is now read-only.
This repository was archived by the owner on Aug 9, 2025. It is now read-only.

Can't get APIkit console to work if accessed through a reverse proxy #16

@rtolsson

Description

@rtolsson

Setup:

Mule server version is 3.4. APIkit version is 1.2.

  1. Main flow contains an APIkit router having an HTTP inbound that listens on http://0.0.0.0:8081/api/v1
  2. APIkit config specifies console path "/console"
  3. RAML file specifies a baseURI "https://proxy.somedomain/dev/internal/api/{version}". Version is "v1".
  4. Application is built and deployed to the Mule server.

Console is then accessed via a reverse proxy (nginx installed on the Mule server) at https://proxy.somedomain/dev/internal/api/v1/console . The request is forwarded by nginx to http://localhost:8081/api/v1/console .

Console tries to load but after a short while this message is shown:

{"context":"while fetching http://localhost:8081/api/v1/","context_mark":null,"message":"cannot fetch http://localhost:8081/api/v1/ (while fetching http://localhost:8081/api/v1/\ncannot fetch http://localhost:8081/api/v1/ (NetworkError: A network error occurred.))","problem_mark":null}

Telling nginx to set the Host header to the host of the inbound URL doesn't help. The error message is still the same, the host just changes to "proxy.somedomain".

I thought the RAML baseUri (if specified) should be used as the console base URL, but apparently it isn't. Is there a way of configuring Mule/APIkit to make the console work behind a reverse proxy?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions