如果在对特定资源存储库使用Assets EssentialsUI时无法创建任务,请将缺少的值添加到Apache Sling反向链接筛选条件OSGi配置的“允许正则表达式主机”属性中。
描述
description
AEM as a Cloud Service
问题/症状
为特定资源存储库使用Assets EssentialsUI(也称为工作区)时,无法创建任务。
完成任务并单击
保存
,错误“
无法创建任务
“”出现。
此外,浏览器的开发人员控制台会显示以下错误:
Access to fetch at 'https://author-pxxxxxx-eyyyyyy.adobeaemcloud.com/adobe/collab/tasks/id/urn:aaid:aem:4c0a5fe9-1020-42dd-b737-b7b5c7909760' from origin 'https://exc-unifiedcontent.experience.adobe.net' has been blocked by CORS policy:
No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
MetricsNetworkIntercept.ts:159
解决方法 resolution
在检查日志时,发现创建任务的请求被 ReferrerFilter
- [
1]
此外,在验证Apache Sling反向链接过滤器OSGi配置时,发现无法创建任务的实例上未定义任何 "Allow Regexp Host"
.
但是, "Allow Regexp Host"
应该具有值 [
2]
已定义。
将缺少的值添加到 "Allow Regexp Host"
Apache Sling引用过滤器OSGi配置的属性修复了问题。
[
1]
msg: [ qtp625718124-83] org.apache.sling.security.impl.ReferrerFilter Rejected referrer header for POST request to /adobe/collab/tasks/id/urn:aaid:aem:19f8dd63-98ba-4575-8794-933af336fe88 : https://experience.adobe.com/
msg: [ qtp937089041-8996] org.apache.sling.security.impl.ReferrerFilter Rejected referrer header for POST request to /adobe/collab/tasks/id/urn:aaid:aem:4c0a5fe9-1020-42dd-b737-b7b5c7909760 : https://exc-unifiedcontent.experience.adobe.net/
"https://.*\\.adobe\\.com:443",
"https://.*\\.adobe\\.net:443",
"https://.*\\.workfront\\.com:443",
"https://.*\\.workfront-dev\\.com:443",
"https://.*\\.dev\\.workfront\\.tech:443"