Skip to content

fix(redis): accept REDIS_URL for TLS providers - #2805

Open
poboll wants to merge 1 commit into
mx-space:masterfrom
poboll:codex/redis-url-tls-compat-20260811
Open

fix(redis): accept REDIS_URL for TLS providers#2805
poboll wants to merge 1 commit into
mx-space:masterfrom
poboll:codex/redis-url-tls-compat-20260811

Conversation

@poboll

@poboll poboll commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • accept REDIS_URL as a provider-compatible alias for REDIS_CONNECTION_STRING
  • keep a deterministic priority: REDIS_CONNECTION_STRING, then REDIS_CONNECTION, then REDIS_URL
  • apply the same alias behavior to direct Core starts and the Docker entrypoint
  • document rediss:// TLS configuration for managed providers such as Upstash

Root cause

Core already enables TLS when a connection string uses the rediss:// scheme. However, the runtime and Docker entrypoint did not consume the provider-standard REDIS_URL variable, while the documentation only listed host, port, and password settings. An Upstash deployment using the supplied REDIS_URL therefore fell back to a non-TLS local/host configuration and repeatedly timed out.

Implementation

  • move Redis URL parsing into a pure, testable utility
  • resolve canonical and compatibility environment names in one place
  • add the Docker alias while preserving sanitized startup logging and precedence
  • add regression coverage for alias selection, TLS parsing, credential stripping, and invalid protocols

Verification

  • pnpm -C apps/core exec vitest run src/utils/redis-config.util.spec.ts (4 tests passed)
  • pnpm -C apps/core run typecheck
  • pnpm -C apps/core run build
  • ESLint on the changed TypeScript files
  • Docker entrypoint smoke tests for REDIS_URL, alias precedence, and masked logging
  • bash -n docker-entrypoint.sh
  • git diff --check

Fixes #2762

@safedep

safedep Bot commented Aug 11, 2026

Copy link
Copy Markdown

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

No dependency changes detected. Nothing to scan.

View complete scan results →

This report is generated by SafeDep Github App

@gitguardian

gitguardian Bot commented Aug 11, 2026

Copy link
Copy Markdown

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@poboll
poboll force-pushed the codex/redis-url-tls-compat-20260811 branch from fdeff70 to 4a96c99 Compare August 11, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

redis链接时的SSL问题

1 participant