Skip to content

StatusPageApiInternalUrl uses public HOST instead of internal service hostname #2475

Description

@mahdi13830510

Describe the bug
StatusPageApiInternalUrl in Common/Server/EnvironmentConfig.ts is built from AppApiClientUrl, which uses the public HOST and HTTP_PROTOCOL env vars. In Kubernetes (and any multi-host deployment) this causes the app container to call its own public ingress for the SEO lookup:

APIException: Request failed to https://my_domain/api/status-page/seo/...
connect ETIMEDOUT 10.10.10.10:443

The request originates from inside the pod and tries to reach the external URL, which may be unreachable or cause an ETIMEDOUT.

Root cause
EnvironmentConfig.ts already has AppApiHostname (built from SERVER_APP_HOSTNAME:APP_PORT env vars) for exactly this purpose, but StatusPageApiInternalUrl was never updated to use it.

Expected behavior
Internal server-to-server calls should use the internal service hostname so they stay within the cluster.

Proposed fix
Change StatusPageApiInternalUrl to:

export const StatusPageApiInternalUrl: URL = new URL(
  Protocol.HTTP,
  AppApiHostname,
  new Route(`${AppApiRoute.toString()}/status-page`),
);

Deployment Type
Kubernetes (Helm chart)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions