I'm trying to create a fiddler (v4.x) extension that builds and adds a custom header to requests generated by the composer. I started down the road of creating an IAutoTamper implementation that adds the header on the AutoTamperRequestBefore event. I quickly realized that this event fires for every request that passes through the fiddler proxy, not just for requests generated from the composer.
Is there any way to detect if a request was generated by the composer? Alternatively, is there a better extension point to handle this in other than through an AutoTamper?
If you right-click on a session in the Web Sessions list, you can choose Properties to see all of the Session Flags set on that session. You'll notice that all requests from the composer have a flag named X-From-Builder.
So, in your extension's code, you can simply write:
// Inside AutoTamperRequestAfter
if (oSession.oFlags.ContainsKey("X-From-Builder")) {
// Whatever...
}