Repository navigation
Description
Summary
Add first-class Redirect Hosts to RentnerProxy.
Redirect Hosts are different from Proxy Hosts and from the existing Force HTTPS behavior.
They allow a configured source hostname to redirect requests to another destination instead of proxying them to an upstream server.
Initial Beta Scope
Support:
- one or multiple source domains
- HTTP source requests
- HTTPS source requests when a certificate is assigned
- destination URL
- status codes:
- 301
- 302
- 307
- 308
- optional preservation of the original request URI
- enable / disable
- certificate assignment
- Force HTTPS only where semantically applicable
- RBAC
- desired-state integration
- OpenResty rendering
- preview/apply/revision behavior consistent with Proxy Hosts
- UI management
- translations
- tests
Examples
Source:
old.example.com
Destination:
https://new.example.com
Possible result:
https://new.example.com/foo?bar=1
when request URI preservation is enabled.
Another example:
→ 308
https://example.com/new-location
Requirements
Redirect Hosts must be first-class objects.
Do NOT model them as fake Proxy Hosts with a magic upstream.
Do NOT insert redirect behavior into arbitrary Advanced Config as the primary implementation.
The database and desired-state model must clearly represent the redirect behavior.
Safety
- validate source domains using the existing domain rules where applicable
- prevent duplicate domain ownership across Proxy Hosts and Redirect Hosts
- validate redirect destination
- prevent header injection
- no raw user-controlled nginx directive generation
- status code limited to supported redirect codes
- generated nginx config must pass the existing candidate validation / nginx -t flow
- failed apply must preserve last-known-good traffic
Acceptance Criteria
- Redirect Host CRUD exists
- source domains are globally collision-safe
- enable/disable works
- HTTP redirect works
- HTTPS redirect works with certificate
- 301 works
- 302 works
- 307 works
- 308 works
- request URI preservation works
- configured destination without URI preservation works
- UI exists
- permissions exist
- tests exist
- real OpenResty smoke coverage exists
- existing Proxy Hosts remain unaffected
Milestone order
This is the first Beta 1 implementation item. Durable runtime reconciliation follows; production smokes may proceed independently.
Activity