When the login session fails to prevent iframe sub-page login page appears

Solutions are as follows:

<head>
<script>
     /**登陆判断是否是子页面跳转到登录页,如果是子页面,则定位到顶层父级页面登录*/
    if (window.top != null && window.top.document.URL != document.URL){
        window.top.location= document.URL;
    }
</script>
</head>

Add to the above js code in the login page.

Published 14 original articles · won praise 2 · Views 799

Guess you like

Origin blog.csdn.net/breakaway_01/article/details/103430718