Forum Discussion
APM Open a second startup browser after the webtop portal launch
Kevin, Thanks a lot for your reply I tried a different approach this week-end and it's working fine : I'm injecting a javascript that open a second browser with the rewritten link of my resource but I have currently an issue with the sso for the resource. It seems that the sso mapping that I defined in the access policy doesn't apply to the application when I call it with the javascript, it does work when I click the webtop.
Any hint about that ? also, any suggestion to improve the irule is welcomed. I'll give a try to your solution later.
when CLIENT_ACCEPTED { ACCESS::restrict_irule_events disable } when RULE_INIT { set web_code " type='text/javascript'> type='text/javascript'> window.open('https://portal.corporate.com/f5-w-687474703a2f2f676f6f676c652e636f6d$$/')
" }
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 " type='text/javascript'> type='text/javascript'> window.open('https://portal.corporate.com/f5-w-687474703a2f2f676f6f676c652e636f6d$$/')
" 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
* 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