开发者

Block webpage from removing a iframe

Im trying to load a iframe around the citrix access gateway website, so we can link to the documenation. To my great joy the CAG webpage actualy prevents this and closes my iframe.

Does anyone have any idea on load some html so i can link to documenation on the citrix page?

Limitations:

1) You cannot edit the web page thats shown to the 开发者_如何学Cuser from CAG server.

So you have to lead users in via gateway.mydomain.com and have this page then load both the text/documentation and cag website.

Html code used from iframe:

<frameset cols="100%" rows="*,110" frameborder="0" border="0" framespacing="0"> 
<frame src="https://sgsvg221cag.applysorco.no"> 
<frame src="http://desktop.sorco.no/InfoSorco.htm"></frameset> 
<noframes> 
seo links to content 
</noframes>


The following code in the head section on the website prevents adding the page in an iframe:

var isCredentialSubmitting = false;

function initStart(){
    //check the window is top window, if it is not, reload the page. (this can avoid to show logon page in child frames)
    if(self!=top){
        top.location.replace(self.location.href);
        return;
    }else{
        document.documentElement.style.display = 'block' ;
    }

This cannot be prevented (if the client has JS eabled).

Perhaps you can try to get the contents of the page using some backend code (e.g. PHP) and paste the contents in your own pages.


In fact, you can edit the code in you Citrix Access Gateway.

If you have access to your administrative console, you can access the files inside CAG through a Secure FTP connection, using WinSCP for example.

Once there you can edit the file /netscaler/ns_gui/vpn/index.html and comment or modify that js to only allow certain top locations.

For more info: http://support.citrix.com/article/CTX117277

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜