Expose inbound request host to http-server templates - #207
Merged
andrewkroh merged 1 commit intoJul 8, 2026
Merged
Conversation
andrewkroh
force-pushed
the
expose-request-host-to-http-server-templates
branch
from
July 8, 2026 13:35
cd033c6 to
bb41bb0
Compare
Mock APIs need same-origin absolute URLs in Link headers and pagination
responses, but {{ hostname }} returns the container OS hostname rather than
the host the client used. Add .request.host from http.Request.Host so
fixtures can build URLs from the actual inbound request.
Closes elastic#206
andrewkroh
force-pushed
the
expose-request-host-to-http-server-templates
branch
from
July 8, 2026 14:10
bb41bb0 to
ec84eea
Compare
💚 Build Succeeded
History
|
efd6
approved these changes
Jul 8, 2026
This was referenced Aug 4, 2026
Merged
kolide: fix system-test mock pagination origins with stream .request.host
elastic/integrations#20521
Open
andrewkroh
added a commit
to elastic/integrations
that referenced
this pull request
Aug 4, 2026
#20520) Replace stream {{ hostname }}:PORT absolute URLs in system-test mocks with {{ .request.host }}, bump mock images to stream:v0.23.0, remove compose `hostname: svc-*` pins, and drop unused compose PORT env (listen via --addr). httpjson rejects pagination when the mock emits a container-ID origin instead of the svc-* alias the agent uses. elastic/stream#206 and elastic/stream#207 expose the inbound request Host so mocks stay same-origin. Closes #20074 Closes #20495
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mock APIs need same-origin absolute URLs in Link headers and pagination responses, but {{ hostname }} returns the container OS hostname rather than the host the client used. Add .request.host from http.Request.Host so fixtures can build URLs from the actual inbound request.
Closes #206