iGLOO-be/cf-curl

Support for User Agent (-A)

JamoCA opened this issue · 0 comments

Many WAFs are configured to block access if the username is empty or if it contains "CURL".

Please add support for specifying a custom user-agent as well as a default user agent.

I've added a default value to the public init function:

variables.useragent = "cf-curl";

and then added this logic to to the private _commandArg function.

if(len(trim(variables.useragent))){
    c.add('-A "#variables.useragent#"');
}