从特定的IP/域禁用CSRF令牌
我想将CSRF令牌排除在特定的IP/域中登录,因此客户端可以登录网站而无需再次输入其凭据。现在我只能排除URI。
class VerifyCsrfToken extends Middleware
{
protected $except = [
'/login',
];
}
我尝试了 https://stackoverflow.com/a/a/a/47189446/47189446/55597724 但页面返回
解决方案 419。也不起作用。
protected $except = [
'http://ip',
'ip',
];
I want to exclude CSRF token for login from specific ip/domain, so client could login to the website without input their credential again. Now I could only exclude the URI.
class VerifyCsrfToken extends Middleware
{
protected $except = [
'/login',
];
}
I tried the solution from https://stackoverflow.com/a/47189446/5597724 but the page return 419.
Below solution also not work.
protected $except = [
'http://ip',
'ip',
];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论