-
Notifications
You must be signed in to change notification settings - Fork 30
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
Request Rewriting not working as expected with regex #1236
Comments
🤖 Hello @Deepak1711! 👋 I'm Dosu, an AI bot that helps with bug-solving, Q&A, and onboarding contributors. While we're waiting for a human maintainer, I'm here to help with your GoReplay journey. Don't worry, we'll get your issue sorted out! 😊💻🚀 Based on your description, it seems like you're experiencing an issue with the Your command appears to be correct: ./gor --input-raw :3000 --output-http="http://athena-service.uranus.svc.cluster.local" \
--http-rewrite-url "/__onemg-internal__/end_user/v1/drug_skus/(\d+)/dynamic:/pharma-pdp/v1/drug/dynamic/$1" \
--http-allow-url "/__onemg-internal__/end_user/v1/drug_skus/(\d+)/dynamic" This command should rewrite all If the regex group is not being captured correctly, it might be a bug in the version of GoReplay you're using. I would recommend updating to the latest version of GoReplay and trying again. If the problem persists, it might be worth reporting this as a bug to the GoReplay team. The For more information, you can refer to the Request Rewriting section in the GoReplay documentation. I hope this helps! If you have any other questions or need further clarification, feel free to ask. -Dosu SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
It seems I am already on the latest stable version. Reference: https://github.com/buger/goreplay/releases |
I am using following tar: gor_1.3.3_x64.tar.gz
Gor command used:
./gor --input-raw :3000 --output-http="http://athena-service.uranus.svc.cluster.local"
--http-rewrite-url "/onemg-internal/end_user/v1/drug_skus/(\d+)/dynamic:/pharma-pdp/v1/drug/dynamic/$1"
--http-allow-url "/onemg-internal/end_user/v1/drug_skus/(\d+)/dynamic"
Request is being received at the output server, but the regex group is not captured inside $1.
As you can see in the above SS, the uri is /pharma-pdp/v1/drug/dynamic/ while it should have been /pharma-pdp/v1/drug/dynamic/1234.
Can somebody help with this?
The text was updated successfully, but these errors were encountered: