问题描述
我仅在使用Synfony 5时在Firefox上出现控制台错误,我到处检查以找到解决方案,但是我发现在symfony问题上问题出自Firefox,我想确定或找到解决方案
控制台错误:
“ sf_redirect” cookie不久将被拒绝,因为其“ SameSite”属性设置为“ None”或无效值,并且不具有“ secure”属性。要了解有关“ SameSite”属性的更多信息,请参见https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite
“ sf_redirect” cookie被拒绝,因为它已经过期。
Symfony 5 framework.yaml
framework:
secret: '%env(APP_SECRET)%'
#csrf_protection: true
#http_method_override: true
# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
session:
handler_id: null
cookie_secure: auto
cookie_samesite: lax
#esi: true
#fragments: true
PHP_errors:
log: true
谢谢。
解决方法
Cookie datetime.strptime('8/18/2020 11:08:54 PM','%m/%d%Y %I:%M:%S %p' )
仅适用于ValueError: time data '8/18/2020 11:08:54 PM' does not match format '%m/%d%Y %I:%M:%S %p'
。有关更多信息,请参见here。另外,如何在symfony
就像您看到的那样,我的cookie中的属性已经得到保护,并且只有在我的CRUDS更新数据库中的实体之后,才会出现此问题。
在我的最后一条评论中,我经过一番搜索后指的是issues,我发现这个Mozilla显然甚至是Firefox 80也有一些困难,很可能很快就会解决此问题。
谢谢您的留言,并祝您一切顺利。