# ReverseProxy::FormFiller config example
# Put this file somewhere on your server - typically in 
# /etc/apache2/FormFiller/ -, adapt it and point to it in Apache2 config,
# through a directive like
#     PerlSetVar FormFillerParamFile "<current file path>"

# jQuery selector to the form to fill
# optional: if not defined, first form in web page will be filled
form      => "form:first",
# may rely on perl functions and Apache environment vars, e.g
#form      => '(localtime)[2] >= 12 ? "#morningForm" : "#afternoonForm"',

# To enable form auto-submit, or to automatically click on a button
# may be true (enabled), false (disabled), or a jQuery selector to the button to click on
submit    => "true",
# may also rely on perl functions and Apache environment vars
# optional, default value: false

# URL to load jQuery,
# since ReverseProxy::FormFiller response filter relies on jQuery (any version >= 1.0)
# optional: if not defined, jQuery is supposed to be already loaded in the web page
jQueryUrl => "",

# Form fields to fill in response body - filled data will be seen by user
# Fields value can rely on perl functions and Apache environment vars
publicFormData => {
    company  => "SnakeOilsInc",
    user     => '$ENV{REMOTE_USER} =~ /(rtyler|msmith)/ ? "user" : $ENV{REMOTE_USER} =~ /dwho/ ? "admin" : "nobody"',
    password => "hidden"
},

# Form fields to fill in request body - filled data will not be seen by user
# Fields value can rely on perl functions and Apache environment vars
# Note that publicFormData are also re-filled in request body,
# to prevent malicious users to tamper them
secretFormData => {
    password => '$ENV{REMOTE_USER} =~ /(rtyler|msmith)/ ? "user-secret" : $ENV{REMOTE_USER} =~ /dwho/ ? "admin-secret" : ""',
},
