Skip to content

fix(k8s): Open WebUI allows every CORS origin #5306

Closed

Description

@dan-petty

Problem Description

Open WebUI logs this line at start: WARNING: CORS_ALLOW_ORIGIN IS SET TO '*' - NOT RECOMMENDED FOR PRODUCTION DEPLOYMENTS. k8s/llm/values-open-webui.yaml sets no CORS_ALLOW_ORIGIN, so the chart default * applies. An Ingress exposes Open WebUI at chat.<domain>.

The real chat host must stay out of git (AGENTS.md rule 10, SECURITY.md item 8). devops k8s deploy-stack writes the domain at deploy time through src/devops_cli/k8s/argocd_overrides.py, but only as Kustomize patches, and open-webui is a Helm Application.

Reproduction Steps

  1. Start the Open WebUI pod from the current values.
  2. Read its start log in Loki: {namespace="llm", container="open-webui"} |= "CORS_ALLOW_ORIGIN".

Expected vs Actual Behavior

Expected: Open WebUI allows only its own chat origin.

Actual: Open WebUI allows every origin.

Environment Diagnostics

  • DevOps CLI Version: 0.124.0
  • Execution Environment: homelab Kubernetes cluster, managed by Argo CD; Open WebUI from its Helm chart

Logs, Traces, or Terminal Output

# Loki 2026-11-06T05:20:01Z: 1 line
WARNING: CORS_ALLOW_ORIGIN IS SET TO '*' - NOT RECOMMENDED FOR PRODUCTION DEPLOYMENTS.
# k8s/llm/values-open-webui.yaml: no CORS_ALLOW_ORIGIN. Line 93 names chat.<domain>.
# src/devops_cli/k8s/argocd_overrides.py:1-8: 'No homelab value enters git'.
# The pod is Pending now (its volume is on a cordoned node), so verify after it runs again.

Proposed Fix

Extend argocd_overrides (src/devops_cli/k8s/argocd_overrides.py) so that deploy-stack writes CORS_ALLOW_ORIGIN=https://chat.<configured domain> as a Helm value override on the open-webui Application (k8s/argocd/apps). Add a test. Keep the value out of k8s/llm/values-open-webui.yaml. Open WebUI also uses this list for its Socket.IO origin check, so check that the chat page works after the change. Check the variable name against the version of dan-petty/homelab#353. The Qdrant Api key is used with an insecure connection warning is cosmetic for in-cluster traffic.

Acceptance Criteria

  • A test shows that deploy-stack writes CORS_ALLOW_ORIGIN=https://chat.<configured domain> as a Helm value override on the open-webui Application.
  • k8s/llm/values-open-webui.yaml and the other files in git hold no real host.
  • After the next start, the Open WebUI log has no CORS_ALLOW_ORIGIN IS SET TO '*' line.
  • The chat page loads, and its Socket.IO connection works from the chat origin.

Activity

  1. added
    type/bug
    source/agent
    scope/k8s
    status/new
    value/high
    effort/low
    on Nov 13, 2026
  2. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor
    • Priority: P1-High. Open CORS on a chat application lets any origin read or send data to it.
    • Related: feat(k8s): set the homelab domain in container env values #4542, which asks for a different change. Both extend argocd_overrides.py to inject domain values at deploy time, but dan-petty/devops-cli#4542 targets Homepage env values while the candidate targets Open WebUI CORS.
  3. added
    priority/p1-high
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 13, 2026
  4. removed
    status/in-progress
    owner/agent
    on Nov 13, 2026
  5. devops-cli-service commented on Nov 13, 2026

    @devops-cli-service
    Contributor
  6. devops-cli-service commented on Nov 13, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-13 12:38 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p1-highscope/k8ssource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions