While the previous sections examined using CORS in frameworks built with PHP, Adobe Experience Manager is built with Java.
Tip
In 2013, Adobe systems renamed the Adobe CQ WCM to Adobe Experience Manager (also known as Adobe AEM or just AEM).
AEM has a Java package for CORS. Another option is to allow domains to post to Sling in the CRX console; when domains are trusted this way, CORS is unnecessary. In some cases, such as when using Scene 7, CORS headers may need to be added with rulesets.
AEM includes a package named com.adobe.cq.social.commons.cors
. The package contains four classes:
Classes in com.adobe.cq.social.commons.cors |
Description |
---|---|
CORSAuthenticationFilter |
Adds CORS headers to HTTP responses |
CORSAuthInfoPostProcessor |
CORS authentication post processor |
CORSConfig |
Singleton configuration holder so that both the CORS filter and CORS post processor have access to the system settings |
CORSConstants |
CORS... |