[英]Laravel 7 session break on IFRAME in a different domain
Am trying to develop an simple Laravel application here:我正在尝试在这里开发一个简单的 Laravel 应用程序:
https://shopifyapp.sjranjan.com https://shopifyapp.sjranjan.com
This login is working fine.此登录工作正常。 Now i pushed the above URL inside a iframe in this page...
现在我在这个页面的 iframe 里面推了上面的 URL ...
http://thephpworld.com/iframe.php http://thephpworld.com/iframe.php
When i try to login there it says... "419 Page Expired"当我尝试在那里登录时,它说...“419 页面已过期”
i see this error is related to CSRF token.我看到这个错误与 CSRF 令牌有关。 I tried removing that also.
我也尝试删除它。 Same issue remains.
同样的问题仍然存在。
If i put inside a iframe in same domain it is working fine.如果我将 iframe 放入同一域中,它工作正常。 But my requirement is that this app has to work on a iframe inside another website.
但我的要求是这个应用程序必须在另一个网站内的 iframe 上运行。 How to deal with this?
如何处理?
Any help would be appreciated !任何帮助,将不胜感激 !
I finally fix this by editing config/sessions.php file by changing the following...我最终通过更改以下内容来编辑 config/sessions.php 文件来解决此问题...
FROM 'same_site' => 'lax' TO 'same_site' => 'none'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.