Skip to content

feat/http proxy host header UI#1258

Merged
mattdjenkinson merged 7 commits into
mainfrom
feat/http-proxy-host-header-ui
May 18, 2026
Merged

feat/http proxy host header UI#1258
mattdjenkinson merged 7 commits into
mainfrom
feat/http-proxy-host-header-ui

Conversation

@mattdjenkinson
Copy link
Copy Markdown
Contributor

Added the option to add a custom host header to an AI Edge. Also cleaned up some AI UI bits.

NSO change: datum-cloud/network-services-operator#159

Ref: datum-cloud/enhancements#569

Screenshot 2026-05-13 at 20 41 17

Add a Host header override field to the AI Edge Configuration card with
its own edit dialog, closing the parity gap with the `datumctl
Set-Host-Header` flow. Primary use case is Datum Desktop tunnels to
localhost where the local service expects a specific Host value (per
enhancement datum-cloud/enhancements#569).

Key changes:
- Add `hostHeader` field on the adapted HttpProxy shape; read/write
  rule-level `requestHeaderModifier.set[name=Host]` (case-insensitive
  read, capitalised write) to round-trip with `datumctl`-managed
  resources
- Surface FR-4 form-editability classification (`simple`, `host-only`,
  `advanced`) on the adapted shape so callers can decide between the
  edit form and a read-only banner without re-reading the raw resource
- Permissive client-side validation (RFC 1123 + `localhost` /
  `*.internal`); reject bare IPv4/IPv6 with a clear message
- Render Host header row on the Configuration card with em-dash when
  unset; pencil icon opens the edit dialog
- Read-only banner with `datumctl` guidance when the resource has
  filters the form cannot represent without data loss
- Add 48 Cypress component unit tests covering classify, validate,
  extract, read/write paths, and round-trip parity with the wiki
  example
@mattdjenkinson mattdjenkinson requested a review from a team May 15, 2026 11:03
@github-actions
Copy link
Copy Markdown

🧪 Test Summary

Job Status
E2E Regression ⏭️ skipped
E2E Smoke ✅ success
Unit Tests ✅ success

View workflow run

📎 Artifacts

No artifacts (all tests passed).

@github-actions
Copy link
Copy Markdown

🧪 Test Summary

Job Status
E2E Regression ⏭️ skipped
E2E Smoke ✅ success
Unit Tests ✅ success

View workflow run

📎 Artifacts

No artifacts (all tests passed).

Copy link
Copy Markdown
Contributor

@kevwilliams kevwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think we should consider adding this to the create flow in the advanced section so that way the first request when the proxy starts doesn't get rejected. Making it so you can only do this after its created means its going to have some failures if the upstream is looking for a specific host.

Comment thread app/resources/http-proxies/http-proxy.adapter.ts Outdated
Comment thread app/resources/http-proxies/http-proxy.adapter.ts Outdated
Comment thread app/features/edge/proxy/form/host-header-field.tsx Outdated
@github-actions
Copy link
Copy Markdown

🧪 Test Summary

Job Status
E2E Regression ⏭️ skipped
E2E Smoke ✅ success
Unit Tests ✅ success

View workflow run

📎 Artifacts

No artifacts (all tests passed).

Address review feedback on the Host header override field:

- Reject wildcards (e.g. *.example.com) with a clear message. The Host
  header is forwarded verbatim by Envoy, so wildcards are meaningless:
  no upstream certificate or virtual host can match a wildcard literal.
  Wildcards belong in spec.hostnames, not here.
- Reframe IP-literal rejection. IP addresses are technically valid per
  RFC 7230, but no upstream TLS cert or virtual host will match an IP,
  so the request would fail in practice. Message now reads "Upstream
  TLS certificates will not match an IP..." instead of calling IPs
  invalid.
- Tighten the field placeholder to reflect the real use case ("make the
  upstream see the cert hostname it expects") with a neutral example
  pair: inference.example.com or api.internal.

Keep validateHostHeader (adapter) and _validateHostHeaderForSchema
(zod) in sync, and update Cypress component tests to assert the new
behaviour and error messages.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mattdjenkinson
Copy link
Copy Markdown
Contributor Author

I also think we should consider adding this to the create flow in the advanced section so that way the first request when the proxy starts doesn't get rejected. Making it so you can only do this after its created means its going to have some failures if the upstream is looking for a specific host.

We specifically opted to make the create process as slim as possible for AI Edge to get people up and running as quickly as possible. I would prefer to keep it that way for now if we can.

@github-actions
Copy link
Copy Markdown

🧪 Test Summary

Job Status
E2E Regression ⏭️ skipped
E2E Smoke ✅ success
Unit Tests ✅ success

View workflow run

📎 Artifacts

No artifacts (all tests passed).

kevwilliams
kevwilliams previously approved these changes May 18, 2026
@kevwilliams
Copy link
Copy Markdown
Contributor

I also think we should consider adding this to the create flow in the advanced section so that way the first request when the proxy starts doesn't get rejected. Making it so you can only do this after its created means its going to have some failures if the upstream is looking for a specific host.

We specifically opted to make the create process as slim as possible for AI Edge to get people up and running as quickly as possible. I would prefer to keep it that way for now if we can.

Seems reasonable, if it starts to become a problem we could add it later.

…header-ui

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	app/routes/project/detail/edge/detail/index.tsx
@github-actions
Copy link
Copy Markdown

🧪 Test Summary

Job Status
E2E Regression ⏭️ skipped
E2E Smoke ✅ success
Unit Tests ✅ success

View workflow run

📎 Artifacts

No artifacts (all tests passed).

@mattdjenkinson mattdjenkinson merged commit b415f99 into main May 18, 2026
14 checks passed
@mattdjenkinson mattdjenkinson deleted the feat/http-proxy-host-header-ui branch May 18, 2026 17:59
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.

2 participants