Skip to content

Webhook URL is shown as http:// behind an HTTPS proxy #3601

Closed

Description

@AndriiPasternak31

Build: v1.0.0-rc2 (96f88f9), hosted compose. Found during release-test row B21 (abilityai/trinity-enterprise#847).

Steps

  1. On an install served over HTTPS behind a proxy, open an agent → Schedules → a schedule → Webhook → Enable webhook.
  2. Read Webhook URL and the Example request curl.

Expected

https://<your-domain>/api/webhooks/<token>.

Actual

  • http://<your-domain>/api/webhooks/<token>. The copied curl worked here only because the test host also accepts plain HTTP. Where HTTP redirects to HTTPS, a plain curl -X POST does not follow the redirect and the schedule does not fire. Where it does not redirect, the secret URL goes over plain HTTP. (Both read from how curl and redirects behave; not tested on an HTTPS-only install.)
  • Already the case on v0.9.5 (same compose command).

Where

The URL base is request.base_url (src/backend/routers/schedules.py:673-676). docker-compose.hosted.yml:578 and docker-compose.prod.yml:511 replace the backend image's command and drop its --proxy-headers --forwarded-allow-ips=* (docker/backend/Dockerfile:222), so the backend never sees X-Forwarded-Proto. Same cause as #2907 (MCP URL advertised as http). It likely also makes every visitor share the proxy's IP for per-IP rate limits (not verified).

Acceptance criteria

  • Behind an HTTPS proxy the Webhook URL and the curl sample start with https://.
  • The hosted and prod backend commands keep --proxy-headers and a forwarded-allow-ips value suited to the proxy.

Activity

  1. added
    priority-p3
    type-bug
    theme-reliability
    complexity-low
    priority-p2
    and removed
    priority-p3
    on Oct 12, 2026
  2. AndriiPasternak31 commented on Oct 12, 2026

    @AndriiPasternak31
    ContributorAuthor

    Re-triaged for 1.0 (#847, row B21): P3 → P2. Every HTTPS hosted install shows the wrong URL. Correction to the body above: uvicorn already reads proxy headers, but only trusts them from 127.0.0.1, and nothing sets FORWARDED_ALLOW_IPS, so the proxy's X-Forwarded-Proto is ignored. Copying the Dockerfile's wildcard into compose is not the fix; it needs a value scoped to the proxy (see docs/security-reports/cso-2026-09-30.md, finding 16). Same at v0.9.5: release-note for 1.0, fix together with #2907.

  3. added
    status-ready
    on Oct 12, 2026
  4. removed
    status-ready
    on Oct 19, 2026
  5. obasilakis commented on Oct 19, 2026

    @obasilakis
    Contributor

    /claim

  6. added
    status-in-progress
    on Oct 19, 2026
  7. github-actions commented on Oct 19, 2026

    @github-actions

    Claimed by @obasilakis. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/3601-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #3601
  8. AndriiPasternak31 commented on Oct 21, 2026

    @AndriiPasternak31
    ContributorAuthor

    @obasilakis, my ruling on what you asked in #3811: yes, split it. The remaining criterion moves to trinity-enterprise#873, which I've picked up. That criterion is the compose keeping --proxy-headers with a forwarded-allow-ips value scoped to the proxy. It has the same root cause, and the fix has to cover more than the webhook URL. The webhook-URL part of this issue shipped in #3811, so it's yours to close.

  9. added
    status-in-dev
    and removed
    status-in-progress
    on Oct 30, 2026
  10. removed
    status-in-dev
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-lowpriority-p2theme-reliabilitytype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions