Forum Discussion
Madiw_114772
Nimbostratus
May 02, 2014APM Open a second startup browser after the webtop portal launch
Hello,
I'm using a Portal access Webtop to redirect users to the corporate startup page after the access Policy is completed.
the issue I'm having with this method is that the APM standard webtop sta...
Madiw_114772
Nimbostratus
May 05, 2014Code
when CLIENT_ACCEPTED {
ACCESS::restrict_irule_events disable
}
when RULE_INIT {
set web_code "
"}
when HTTP_REQUEST {
set activate_js 0
if { [HTTP::uri] ends_with "/vdesk/webtop.eui?webtop=/Cert/My_Test_webtop&webtop_type=webtop_full" } {
log local0. "URI match full webtop"
Don't allow data to be chunked
if { [HTTP::version] eq "1.1" } {
if { [HTTP::header is_keepalive] } {
HTTP::header replace "Connection" "Keep-Alive"
}
HTTP::version "1.0"
}
set activate_js 1
}
}
when HTTP_RESPONSE {
if {$activate_js equals "1"} {
if { [HTTP::header Content-Type] starts_with "text/html" } {
if { [HTTP::header exists "Content-Length"] } {
log local0. "content length: [HTTP::header {Content-Length}]"
set content_length [HTTP::header "Content-Length"]
} else {
set content_length 1000000000
}
log local0. "Collecting $content_length bytes"
if { $content_length > 0 } {
HTTP::collect $content_length
}
}
}
}
when HTTP_RESPONSE_DATA {
set web_code "
"
my trigger is 8888, it could be anything
if { [HTTP::payload] contains "8888" }{
log local0. "Payload didn't contain $::exist_search!"
set idx [string last "" [HTTP::payload]]
if { -1 == $idx } {
set idx [string last "" [HTTP::payload]]
}
log local0. "html end tag found at $idx"
if { -1 == $idx } {
set offset [HTTP::payload length]
} else {
set offset $idx
}
HTTP::payload replace $offset 0 $web_code
log local0. "HTTP_REQUEST_DATA good"
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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