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

rewrite_to doesn't create the current outbound url #6696

Open
DavidDiegoTal opened this issue Nov 7, 2024 · 3 comments
Open

rewrite_to doesn't create the current outbound url #6696

DavidDiegoTal opened this issue Nov 7, 2024 · 3 comments
Labels

Comments

@DavidDiegoTal
Copy link

Branch/Environment/Version

  • Branch/Version: [e.g. Master/Release/Stable/Feature branch] v5.6.1
  • Environment: [e.g. On-prem/Hybrid/MDCB] On-Prem

Describe the bug
After upgrading to v5.6.1 the next url_rewrites doesn't work as expected:
"url_rewrites": [
{
"path": "/e2e/api/v1/execute/{scenario}",
"method": "GET",
"match_pattern": "/e2e/api/v1/execute/(.*)",
"rewrite_to": "/api/v1/tests/execute/$1"
}]

The actual result is (from Debug logs):
time="Nov 07 12:25:05" level=debug msg="Outbound request URL: http://XXX/e2e/api/v1/execute/run_tyk_health_check" api_id=XXX api_name="E2E Execute API" mw=ReverseProxy org_id=default

it should have be rewritten to: http://XXX/api/v1/tests/execute/run_tyk_health_check. as in previous tyk version v5.1.0

Reproduction steps
Upgrade tyk to v5.6.1

"url_rewrites": [
{
"path": "/e2e/api/v1/execute/{scenario}",
"method": "GET",
"match_pattern": "/e2e/api/v1/execute/(.*)",
"rewrite_to": "/api/v1/tests/execute/$1"
}]

Actual behavior
time="Nov 07 12:25:05" level=debug msg="Outbound request URL: http://XXX/e2e/api/v1/execute/run_tyk_health_check" api_id=XXX api_name="E2E Execute API" mw=ReverseProxy org_id=default

Expected behavior
it should have be rewritten to: http://XXX/api/v1/tests/execute/run_tyk_health_check. as in previous tyk version v5.1.0

Screenshots/Video
If applicable, add screenshots or video to help explain your problem.

Logs (debug mode or log file):
Log from console or from log file.

Configuration (tyk config file):
Attach tyk configuration file

Additional context
Add any other context about the problem here.

@buger
Copy link
Member

buger commented Nov 7, 2024

Hi! From which version you have upgraded? Thanks!

@DavidDiegoTal
Copy link
Author

Upgraded from v5.1.0 to v5.6.1

@DavidDiegoTal
Copy link
Author

We have tested also v5.4.0 and we don't get this issue. Seems that there is an issue with v5.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants