Forum Discussion
AS_6517
Nimbostratus
Jul 24, 2012add a comment just before </body> tag to any HTTP response
Hi,
I am a beginner so excuse my ignorance
2 Replies
- nathe
Cirrocumulus
AS, - hoolio
Cirrostratus
You could also do this more efficiently using a stream profile versus buffering the full payload with HTTP::collect. You'd need to add a blank stream profile and a custom HTTP profile with response chunking set to rechunk.when HTTP_REQUEST { Javascript to inject in text responses (wrap in curly braces to avoid having to escape meta-characters). set js {my javascript goes here...} Disable the stream filter by default STREAM::disable } when HTTP_RESPONSE { Check for text responses if {[HTTP::header value Content-Type] contains "text"} { Replace closing tag with $js STREAM::expression "@@$js@" STREAM::enable } }
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