Tasks cannot be created in Assets Essentials

If you cannot create tasks when using the Assets Essentials UI for a specific asset repository, add the missing values to the “Allow Regexp Host” property of the Apache Sling Referrer Filter OSGi configuration.

Description description

Environment

AEM as a Cloud Service

Issue/Symptom(s)

When using the Assets Essentials UI (also called Workspace) for a specific asset repository, tasks cannot be created.

When filling the task and clicking save, the error “Unable to create task” appears.

Additionally, the browser’s developer console displays the following error:

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 resolution

On checking the logs, it was seen that the request to create the task was rejected by the ReferrerFilter - [ 1]

Further on, upon verifying the Apache Sling Referrer Filter OSGi configuration, it was seen that on the instance where the task could not be created, there was nothing defined for the "Allow Regexp Host".

However, the "Allow Regexp Host" should have the values [ 2] defined.

Adding the missing values to the "Allow Regexp Host" property of the Apache Sling Referrer Filter OSGi configuration fixed the problem.

[ 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/

[ 2]

"https://.*\\.adobe\\.com:443",
"https://.*\\.adobe\\.net:443",
"https://.*\\.workfront\\.com:443",
"https://.*\\.workfront-dev\\.com:443",
"https://.*\\.dev\\.workfront\\.tech:443"
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f