跨域访问导致导致当前平台用户掉线的问题

1、问题代码

<form action="http://localhost:8020/social/webcast/meetLiving" method="post" target="_blank" style="display: none;" id='{{"sbmt" + $index}}'>
                        <input type="text" value="${jwtToken}" name="X-BMK-Auth-Token">
                        <input type="text" name="webinar_id" :value="info.webinar_id">
                        <input type="submit">
                    </form>

在本地测试的时候,我起了两个项目,用这种方式访问的时候会导致当前用户退出。

2、解决方式

<form action="http://192.168.8.22:8020/social/webcast/meetLiving" method="post" target="_blank" style="display: none;" id='{{"sbmt" + $index}}'>
                        <input type="text" value="${jwtToken}" name="X-BMK-Auth-Token">
                        <input type="text" name="webinar_id" :value="info.webinar_id">
                        <input type="submit">
                    </form>

将localhost改成ip即可,原因目前不知,我用的是abutu系统,不知道window寸步存在类似问题

原文地址:https://www.cnblogs.com/sunjf/p/5661316.html