Comments (2)
🤖
Yes, you can configure GoReplay to forward all requests except for the [POST] /users/${ID}
endpoint by using the --http-disallow-url
option. This option allows you to specify a regular expression that matches the URLs you want to exclude from forwarding.
Here is the command you can use:
gor --input-raw :8080 --output-http staging.com --http-disallow-url "/users/.*"
This command will forward all requests except those sent to the /users/${ID}
endpoint. The regular expression /users/.*
matches any URL that starts with /users/
followed by any characters, effectively excluding all URLs of the form /users/${ID}
.
You can find more information about request filtering in GoReplay in the Request Filtering section of the GoReplay wiki.
Also, I can confirm that the current version of GoReplay (v1.3.3) does support the --http-disallow-url
option. This is evident from the HTTPModifierConfig
struct in the GoReplay source code, which has a field named URLNegativeRegexp
that is annotated with json:"http-disallow-url"
. This annotation is used for mapping the JSON configuration field http-disallow-url
to the Go struct field URLNegativeRegexp
.
Here is the relevant code:
type HTTPModifierConfig struct {
URLNegativeRegexp HTTPURLRegexp `json:"http-disallow-url"`
// other fields...
}
This means that when GoReplay is parsing the configuration, it will recognize the http-disallow-url
option and map it to the URLNegativeRegexp
field in the HTTPModifierConfig
struct. You can find this in the http_modifier_settings.go file in the GoReplay repository.
I hope this helps! If you have any other questions, feel free to ask.
Sources
This 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.
from goreplay.
This proposal does not meet the requirements. While control at the path level is indeed possible, it is not feasible at the method level.
from goreplay.
Related Issues (20)
- [Question]: How do I use the --input-raw-max-wait parameter HOT 1
- Can GoReplay capture HTTPS traffic in port 443? HOT 1
- how to know the host when replay to multiple env
- is this support mirror traffic audio streaming request?
- [Question]: What does goreplay mean by what it records into the file
- Are PRO and Enterprise Version still available? HOT 1
- –http-original-host parameter does not take effect HOT 2
- could goreplay record SIP (Session initialization Protocol)?
- File format description is outdated HOT 1
- Goreplay was unable to read Solr requests after a certain length. HOT 4
- Request Rewriting not working as expected with regex HOT 2
- Is there a version that supports REHL5.7 HOT 1
- The response body is truncated HOT 3
- Goreplay not capturing actual user traffic that’s reaching varnish (port: 8983) HOT 16
- ~25% of Requests are not captured by goreplay when compared with production HOT 6
- TCP replay not working. HOT 1
- (question) When will goreplay release new version? HOT 2
- The response payload string is also cut in half
- Middleware Replay Events Not Triggering Correctly with Rate Limiting in Gor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goreplay.