Forum Discussion
1_21GigaWatts_2
Oct 16, 2015Nimbostratus
Set Content-Type to UTF-8 with iRule
If someone would be able to let me know if I'm able to create set an iRule on the F5 to set the Content-Type = UTF-8 for all incoming requests? Is it possible to set the content-type at the Header l...
Kevin_Stewart
Oct 16, 2015Employee
At a minimum, something like this to update the incoming Content-Type header:
when HTTP_REQUEST {
if { ( [HTTP::header exists Content-Type] ) and not ( [string tolower [HTTP::header Content-Type]] contains "charset=utf-8" ) } {
HTTP::header replace Content-Type "[HTTP::header Content-Type]; charset=utf-8"
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects