Skip to content

[codex] fix outgoing auth destination rewriting#644

Merged
winhowes merged 2 commits intomainfrom
codex/fix-outgoing-auth-destination
Apr 25, 2026
Merged

[codex] fix outgoing auth destination rewriting#644
winhowes merged 2 commits intomainfrom
codex/fix-outgoing-auth-destination

Conversation

@winhowes
Copy link
Copy Markdown
Owner

Summary

Fixes outgoing auth for static integrations so auth plugins see the same final upstream destination that will be proxied.

Root Cause

Static integrations previously left URL rewriting to the reverse proxy director, which runs after outgoing auth plugins. As a result, plugins that sign or mutate the URL saw the inbound integration host/path/query instead of the configured upstream destination. Wildcard integrations already applied the destination earlier, so behavior was inconsistent.

Changes

  • Apply the resolved destination before outgoing auth for both static and wildcard integrations.
  • Make the proxy director no-op when the destination has already been applied.
  • Preserve proxy-facing host/URL semantics for metrics request hooks.
  • Add a regression test covering static integration outgoing auth URL visibility.

Validation

  • go test -count=1 ./...
  • go vet ./...
  • git diff --check origin/main...HEAD

Supersedes draft PR #643, which was closed because it included an older branch commit outside this fix.

@winhowes winhowes marked this pull request as ready for review April 25, 2026 02:06
@winhowes
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6fc766d714

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/main.go Outdated
@winhowes
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@winhowes winhowes merged commit 65e60c0 into main Apr 25, 2026
3 checks passed
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