Afshin Lak Posted October 14, 2016 Share Posted October 14, 2016 Thanks Carl! It's working! Link to comment Share on other sites More sharing options...
Timothy Nelson Posted December 19, 2016 Share Posted December 19, 2016 This is great information and I have used it to customize a few gateway pages. Is it possible to display text under the password field and above the Log On button using the X1 theme? All of my current text I am displaying has been under the Log On button but I have received a request to place text just above the Log On button and cannot seem to find any information on using this placement. Link to comment Share on other sites More sharing options...
Felix Onyango Posted January 16, 2017 Share Posted January 16, 2017 Ok gents, I am at a loss here. After trying all the above suggestions on my netscaler, I am still unable to add a custom link on the netscaler homepage right below the logon box. I am running netscaler 11.1.48 in HA mode, enterprise license. Using Default Theme, I have tried custom theme and also built in GreenBubbles theme. I have tried setting _cacheVPNStaticObjects / _cacheOCVPNStaticObjects both to NO CACHE and also unbinding both cache policies from my vserver. ---------------------------------------- This is my policy: add rewrite policy Rx-portal_pol "HTTP.REQ.URL.CONTAINS(\"gateway_login_view.js\")" TX_test_6 This is my action: add rewrite action TX_test_6 insert_before_all "HTTP.RES.BODY(1000000).SET_TEXT_MODE(IGNORECASE)" q{"var logonbelt_bottomshadow = $(\"<div><div style='text-align:center;color:yellow;font-size:15px;'>Insert Code Here</div></div>\").attr('id','logonbelt-bottomshadow');"} -pattern "box_view.prepare_view();" -------------------------------- I can see the hits in the policy increment but nothing shows up on the login page no matters how many times I refresh the page. Any thoughts as to what I am missing? Link to comment Share on other sites More sharing options...
Felix Onyango Posted January 16, 2017 Share Posted January 16, 2017 Just saw that the rewritten code did not make to gateway_login_view.js . See attachment Link to comment Share on other sites More sharing options...
Felix Onyango Posted January 18, 2017 Share Posted January 18, 2017 Ok, after a weekend of digging around I was able to get everything to work as expected. My problem turned out to be local caching on the browser and to correct the issue I had to launch the browser in incognito mode (IE 11), for Chrome use inspect element option and under the network tab at the top check the box [Disable cache]. This forces to browser to download a fresh page every time. Someone had mentioned that earlier on this thread. The other option that you could do to force the browse to refresh is to log into Netscaler using WinSCP and make a change to any file like custom.css under /var/netscaler/logon/themes/Default_Test/css/custom.css (This assumes that you created a custom theme called Default-Test which is based on the Default theme. This citrix article https://support.citrix.com/article/CTX215817 also suggests that you can edit vpn/gateway_login_view.js by adding a space at the end of the file and saving it will force netscaler to push out the file. This is what I used as the basis of my ACTION: add rewrite action rw_act_insert_loginfooter_1 insert_after_all "HTTP.RES.BODY(120000).SET_TEXT_MODE(IGNORECASE)" q{"var login_footer=$(\"<div style='text-align:center;color:#fff;border:2px solid red;'><p>In case of any difficulty:</p>"+"<p>Open the Virtual Desktop FAQ or report it to your System Administrator.</p></div>\").appendTo($(\"#logonbelt-bottomshadow\"));"} -pattern "rdx.utils.get_view(\"gateway_login_form_view\"));" POLICY: add rewrite policy rw_pol_insert_loginfooter_1 "HTTP.REQ.URL.CONTAINS(\"gateway_login_view.js\")" rw_act_insert_loginfooter_1 Thanks Mike/Robert and everyone else for this thread. Link to comment Share on other sites More sharing options...
Martijn Kools Posted March 13, 2017 Share Posted March 13, 2017 Guys, I've tested several rewrite actions but nothing seems to work, the customizaton is not displayed. I'm on 51.26nc 11.1 perhaps something has been changed? Link to comment Share on other sites More sharing options...
Felix Onyango Posted March 13, 2017 Share Posted March 13, 2017 Please post your Policy and RW Action. Are you able to see if your policy is getting hits? Link to comment Share on other sites More sharing options...
Martijn Kools Posted March 13, 2017 Share Posted March 13, 2017 Please post your Policy and RW Action. Are you able to see if your policy is getting hits? These are my commands: > add rewrite action rw_act_insert_belowloginbtn insert_after_all "HTTP.RES.BODY(120000).SET_TEXT_MODE(IGNORECASE)" q{"var login_belowbtn=$(\"<div><a href='http://test.example.com'>Click here</a></div>\").appendTo(right_loginbutton);"} -pattern ".appendTo(right_loginbutton);" Done > add rewrite policy rw_pol_insert_belowloginbtn "HTTP.REQ.URL.CONTAINS(\"gateway_login_form_view.js\")" rw_act_insert_belowloginbtn Done > bind vpn vserver vserver_name -policy rw_pol_insert_belowloginbtn -priority 100 -gotoPriorityExpression END -type RESPONSE Done > save config Link to comment Share on other sites More sharing options...
Felix Onyango Posted March 13, 2017 Share Posted March 13, 2017 The commands look ok, I have not tested though. Are you getting hits on your policy (see screenshot)? if yes, then the issue may be that you need to clear browser cache. In chrome, go to your portal page, right click on the page, select inspect element -> under network tab -> check the box labeled 'Disable cache' (see screenshot) then refresh the portal to see if your changes appear. Link to comment Share on other sites More sharing options...
Martijn Kools Posted March 13, 2017 Share Posted March 13, 2017 The commands look ok, I have not tested though. Are you getting hits on your policy (see screenshot)? if yes, then the issue may be that you need to clear browser cache. In chrome, go to your portal page, right click on the page, select inspect element -> under network tab -> check the box labeled 'Disable cache' (see screenshot) then refresh the portal to see if your changes appear. You are right I'm not getting any hits: https://snag.gy/INBRcj.jpg I've tested with disable cache and IE inprivate browsing. No hits at all. The policy is bind and active: https://snag.gy/JHenEz.jpg Link to comment Share on other sites More sharing options...
Mike Roselli Posted March 13, 2017 Author Share Posted March 13, 2017 Tested those commands on a DEV 11.1.51.21 and 11.1.52.13 builds and they work under the default, green bubble and X1 theme. (will not work if using the RfWebUI) It can take 120 seconds for the rewrite to show up due to the netscaler caching the login page. if you have Enterprise or Platinum you can flush the loginstaticobjects content group under Optimization --> Integrated Caching --> Content Groups or via cli: flush cache contentgroup loginstaticobjects Client web browsers also cache as well so please try clearing the cache of your browser as well. Link to comment Share on other sites More sharing options...
Martijn Kools Posted March 13, 2017 Share Posted March 13, 2017 Tested those commands on a DEV 11.1.51.21 and 11.1.52.13 builds and they work under the default, green bubble and X1 theme. (will not work if using the RfWebUI) It can take 120 seconds for the rewrite to show up due to the netscaler caching the login page. if you have Enterprise or Platinum you can flush the loginstaticobjects content group under Optimization --> Integrated Caching --> Content Groups or via cli: flush cache contentgroup loginstaticobjects Client web browsers also cache as well so please try clearing the cache of your browser as well. I'm on standard but I've added it like 2 hours ago. I'm on version 51.26 though but I don't think that will matter much. Besides I have a HSTS rewrite policy as well and that's active instantly as soon as I bind it, I removed it as test maybe it conflicted but no. We do have 4 virtual servers I adjusted 2 of them one X1 one Greenbubble both don't show anything. Thanks! Link to comment Share on other sites More sharing options...
Mike Roselli Posted March 13, 2017 Author Share Posted March 13, 2017 Should be getting hits if not using the RfWebUi and the content group loginstaticobjects has been updated. If you are unable to flush the content group then see if setting the _cacheVPNStaticObjects policy to NOCACHE helps. (by default that policy is added to all gateway VIPs on creation) FYI one of the screens you have is of the wrong file. the action is rewriting the gateway_login_form_view.js Link to comment Share on other sites More sharing options...
Martijn Kools Posted March 13, 2017 Share Posted March 13, 2017 Should be getting hits if not using the RfWebUi and the content group loginstaticobjects has been updated. If you are unable to flush the content group then see if setting the _cacheVPNStaticObjects policy to NOCACHE helps. (by default that policy is added to all gateway VIPs on creation) FYI one of the screens you have is of the wrong file. the action is rewriting the gateway_login_form_view.js Ok so the policy has to be on gateway_login_view.js right? Link to comment Share on other sites More sharing options...
Martijn Kools Posted March 13, 2017 Share Posted March 13, 2017 So here's my policy in GUI: https://snag.gy/79BNqm.jpg And my action: https://snag.gy/rgeAv3.jpg Still no go though I must be doing something terribly wrong. Link to comment Share on other sites More sharing options...
Mike Roselli Posted March 13, 2017 Author Share Posted March 13, 2017 can you change your policy a little bit? Your action is for rewriting gateway_login_form_view.js but your policy is set to trigger on gateway_login_view.js Link to comment Share on other sites More sharing options...
Martijn Kools Posted March 13, 2017 Share Posted March 13, 2017 can you change your policy a little bit? Your action is for rewriting gateway_login_form_view.js but your policy is set to trigger on gateway_login_view.js Yes I did that as test so now it's this again: https://snag.gy/ji59zc.jpg Still nothing, trying from home now I was thinking that maybe our corporate firewall would cache things. Link to comment Share on other sites More sharing options...
Martijn Kools Posted March 13, 2017 Share Posted March 13, 2017 I found something, when I refresh the page I see the hit counter add 1: https://snag.gy/xVSXK4.jpg I just can't see the URL, the page hasn't changed. Link to comment Share on other sites More sharing options...
Martijn Kools Posted March 13, 2017 Share Posted March 13, 2017 Ok another issue, when I try to delete the policy it says: Bound policies cannot be removed (which makes sense bc I bound it to my virtual server). But then I choose show binding with the policy and it says no bindings found? Link to comment Share on other sites More sharing options...
Martijn Kools Posted March 13, 2017 Share Posted March 13, 2017 Ok so I upgraded to the latest Netscaler and now it works!! (OMG) Thanks guys for all the help!! Link to comment Share on other sites More sharing options...
Martijn Kools Posted March 13, 2017 Share Posted March 13, 2017 Hmm ok I think it just worked now because I restarted the Netscaler. It worked one time but now when I change the text to e.g. all caps the site never updates. I can refresh for hours, clear cache, do anything nothing works. I will check further tomorrow :) Link to comment Share on other sites More sharing options...
Martijn Kools Posted March 14, 2017 Share Posted March 14, 2017 Should be getting hits if not using the RfWebUi and the content group loginstaticobjects has been updated. If you are unable to flush the content group then see if setting the _cacheVPNStaticObjects policy to NOCACHE helps. (by default that policy is added to all gateway VIPs on creation) FYI one of the screens you have is of the wrong file. the action is rewriting the gateway_login_form_view.js Ok I feel a bit embarrassed now lol setting that policy to NOCACHE did the job! I was totally reading over that. Thanks Mike! Sorry for spamming your topic like crazy :) Link to comment Share on other sites More sharing options...
David Joye Posted April 3, 2017 Share Posted April 3, 2017 Should be getting hits if not using the RfWebUi and the content group loginstaticobjects has been updated. If you are unable to flush the content group then see if setting the _cacheVPNStaticObjects policy to NOCACHE helps. (by default that policy is added to all gateway VIPs on creation) FYI one of the screens you have is of the wrong file. the action is rewriting the gateway_login_form_view.js That did the trick for me, huuuuge thanks! Link to comment Share on other sites More sharing options...
Nils Liebherr Posted May 31, 2017 Share Posted May 31, 2017 Hi Folks, I'm trying to customize the AAA vServer logon page, not the NS Gateway page. Regardsless which theme I use (X1, Greenbubble, RfWebUI), there ist no gateway_login_form_view.js loaded so I can't add content to it. Do you have any idea how to add some text and links below the logon button (and below any error message) on a AAA vServer? Thanks Nils Link to comment Share on other sites More sharing options...
Nils Liebherr Posted May 31, 2017 Share Posted May 31, 2017 Additional note: I modified the schema xml and was able to add some text boxes to the page, but it's ignoring any links :-( Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.