Hi Wasfi
Yes this is possible. The KB article Yurisk posted already contains all the information you need. But it can be configured in the CLI only.
The firewall policy must be in proxy mode (6.2) otherwise it won't work.
This example adds the x-forwarded-for value to all outgoing HTTP Urls. You can also limit it to specific URL's in the webfilter urlfilter setting.

config web-proxy profile
edit "1"
set header-x-forwarded-for add
next
end
config webfilter urlfilter
edit 1
set name "add-header"
config entries
edit 1
set url "*"
set type wildcard
set action monitor
set web-proxy-profile "1"
next
end
next
end
config webfilter profile
edit "add-header-webprofile"
config web
set urlfilter-table 1
end
set rate-image-urls disable
end
next
end
config firewall policy
edit 20
set srcintf "INTERN-LAB"
set dstintf "EXTERN"
set srcaddr "TEMP_10.1.1.1"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set utm-status enable
set inspection-mode proxy
set ssl-ssh-profile "certificate-inspection"
set webfilter-profile "add-header-webprofile"
set logtraffic all
set nat enable
next
end
EDIT: Ah.. just noted you want to do this in 5.2 or 5.4. No idea.. looks like these CLI commands don't exist yet.