Skip to content

Server path prefix flag is harmful #2411

@jtlisi

Description

@jtlisi

Currently the weaveworks/common server has the option for a -server.path-prefix flag. Setting this flag in Cortex will cause all requests routed to the prometheus API struct to fail with a 404.

Prometheus registers routes with a hardcoded /api/prom/api/v1/ prefixed route. When requests are routed from the weaveworks server to the Prometheus API promRouter they are expected to have the /api/prom/api/v1 prefix. If the flag -server.path-prefix is set to /example, then traffic will only be routed to the promrouter at the /example/api/prom/api/v1 route. Since this path is different then the hardcoded promrouter prefix, it will always return a 404.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions