Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added global and local ignore path rewriting support to path configurations #126

Merged

Conversation

jacobm-splunk
Copy link
Contributor

Wiretap just blindly rewrites paths that match any configuration.

Some (poorly written) APIs don't necessarily want to rewrite everything under a specific resource location.

The current way to do this is to add a dummy path rewrite that takes precedence. This is kind of hacky and also doesn't jump over target rewriting.

This MR adds first party support for ignoring path rewriting on these unintended endpoints.

pterm.Println()

for _, ignoreRewrite := range ignoreRewritePaths {
pterm.Printf("🙅 Paths matching '%s' will not be re-written regardless of Path Rewrite configuration\n", pterm.LightCyan(ignoreRewrite.Path))
Copy link
Member

Choose a reason for hiding this comment

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

hahaha. another win with the emoji!

Copy link
Member

@daveshanley daveshanley left a comment

Choose a reason for hiding this comment

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

LGTM

@daveshanley daveshanley merged commit 1357ba0 into pb33f:main Jun 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants