Add 'header-includes' matcher & matchReplaceHeaders transform (local mockttp 4.4.2)#229
Closed
komen205 wants to merge 2 commits into
Closed
Add 'header-includes' matcher & matchReplaceHeaders transform (local mockttp 4.4.2)#229komen205 wants to merge 2 commits into
komen205 wants to merge 2 commits into
Conversation
Temporary dependency on a locally-built mockttp 4.4.2 including the new 'header-includes' matcher (withHeadersIncluding), until that's released upstream. No code changes needed: rule deserialization & matching all happens inside mockttp itself. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
Author
|
Closing — not needed. |
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.
Summary
Server-side support for substring header matching and header-value match-and-replace, the counterpart to the corresponding httptoolkit-ui PR.
This repoints the dependency onto a locally-built mockttp 4.4.2 that adds:
header-includesmatcher — matches when a given header's value contains a substring, evaluated server-side like every other matcher (rather than via a UI-side callback). This removes the per-request round-trip and the requirement for the UI to stay connected for matching to work.matchReplaceHeaderstransform — rewrites patterns within a header's value without replacing the whole header (e.g. one cookie inside a multi-cookieCookieheader).Changes
package.json/package-lock.json— point mockttp at the local 4.4.2 build carrying the new matcher + transform.overrides/js/package.json— matching override bump.Notes