1

使用 Diazo 主题时,静态资源当前需要授权才能显示。以下是静态主题的注册方式:

<plone:static directory="static" type="theme" name="projecttheme" />

如果您从这些资源中剥离 cookie(在本例中是通过 varnish),您会在每个静态资源的日志中看到以下错误:

2013-08-29 18:50:35 DEBUG ImplPython Unauthorized: Your user account does not have 
the required permission.  Access to 'project.css' of (FilesystemResourceDirectory
object at /data/project/eggs/project.theme-1.29-py2.7.egg/project/theme/static/styles)
denied. Your user account, Anonymous User, exists at /acl_users. Access requires
Access_contents_information_Permission, granted to the following roles:
['Contributor', 'Editor', 'Manager', 'Owner', 'Reader', 'Site Administrator']. Your
roles in this context are ['Anonymous'].

因此,如果没有 cookie,没有身份验证,那么您会因为权限而被拒绝Access contents information。有没有办法在没有这个限制的情况下提供静态重氮资源?

4

0 回答 0