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

[TT-13765] add check for host rewrite to DynamicMiddleware (js plugin) #6792

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iamdjones
Copy link

Description

Allow hostname rewrite in DynamicMiddleware (mw_js_plugin)

Related Issue

#6791

Motivation and Context

My organization has a use case where we need to route traffic dynamically to a backend hostname based on headers passed into a request. We'd prefer to not manage a GO plugin or it's development environment, and use a custom Javascript plugin instead. However Javascript plugins don't currently allow hostname rewrites.

How This Has Been Tested

Added unit tests provide some coverage. I ran a functional test by building an image and spinning that up as a hybrid data plane node, attached to our tyk hosted control plane. I was able to successfully rewrite the hostname this way.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring or add test (improvements in base code or adds test coverage to functionality)

Checklist

  • I ensured that the documentation is up to date
  • I explained why this PR updates go.mod in detail with reasoning why it's required
  • I would like a code coverage CI quality gate exception and have explained why

@iamdjones iamdjones force-pushed the feature/iamdjones/js-middleware-host-rewrite branch from 8972a75 to f2fdf49 Compare December 19, 2024 02:56
@mhuaco mhuaco changed the title add check for host rewrite to DynamicMiddleware (js plugin) [TT-13765] add check for host rewrite to DynamicMiddleware (js plugin) Dec 20, 2024
@iamdjones iamdjones force-pushed the feature/iamdjones/js-middleware-host-rewrite branch from f2fdf49 to 79a9536 Compare December 20, 2024 20:46
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