Skip to content

feat: support custom gateway with x-dstack-target-gateway header#25

Open
Leechael wants to merge 2 commits intomainfrom
feature-target-gateway
Open

feat: support custom gateway with x-dstack-target-gateway header#25
Leechael wants to merge 2 commits intomainfrom
feature-target-gateway

Conversation

@Leechael
Copy link
Contributor

No description provided.

This adds support for routing to target services using the x-dstack-target-host header as an alternative to x-dstack-target-* headers.

Changes:
- Add target_host field to DstackRequest, read from x-dstack-target-host header
- Update proxy_request to support three routing priorities:
  1. x-dstack-target-app/port/instance headers (highest priority)
  2. x-dstack-target-host header (if it matches target service pattern)
  3. Delegate to dstack.sock (fallback)
- Preserve Host header behavior from main branch (passed through as normal header)
- Integrate with x-dstack-target-gateway feature from feature-target-gateway branch
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.

1 participant