Guide to configure versioned client libraries on AEM and IIS web server on Windows 10 Enterprise.
Tools Used:
- AEM
- IIS Webserver
- ACS Commons Package Version 3.17.x
- AEM Publish instance up and running
- ACS commons package pre-installed
- IIS Website for AEM Instance
STEP-01: ACS Commons Verification
NOTE: It is presumed that ACS Commons is already installed on the AEM instance

ACS Commons Package — version Installed 3.17
- Go to CRX Package manager
- Search for ACS commons
- Verify that the package is installed [if not use this link to install and configure ACS Commons

Application Config Directory
- Go to CRXDE
- select the apps folder
- select your application [sdintranet] where you want to enable versioned clientlibs
- select config folder

App config folder

Rewriter configuration folder
- Right-Click on the config folder
- select Create
- select create Node
- on the pop-up window
- name: rewriter
- Type: sling: Folder
- Click OK
- Press Save All

Copy OOTB rewriter config

Rewriter config on app config folder

Verify and Save
- Go to libs
- select cq
- select config
- select rewriter and right-click on the default
- copy the default config
- go to apps
- go to sdintranet application
- select config
- select rewriter and right-click on the rewriter folder
- paste, verify and press Save All

Rename the configuration
STEP-06: Add transformer Type – versioned-clientlibs
STEP-06: Add transformer Type – versioned-clientlibs

Edit the transformer types

Add the clientlibs transformer type
Make sure you restart the AEM instance, for the clientlibs to take effect, Restarting the remote server can be done in any way you are comfortable, one can directly log into the instance and restart the AEM service, or can remotely restart using Jenkins if configured or can restart using Remote Session.
- Select the renamed rewriter [/apps/sdIntranet/config/rewriter/versioned-clientlibs]
- Edit the transformerTypes property
- click the + symbol
- Add the transformerType versioned-clientlibs
- Click OK
- Press Save All
Make sure you restart the AEM instance, for the clientlibs to take effect, Restarting the remote server can be done in any way you are comfortable, one can directly log into the instance and restart the AEM service, or can remotely restart using Jenkins if configured or can restart using Remote Session.

Get the remote service information

Stop the service

Start the service
STEP-08: Verify the sling rewriter status

STEP-08: Verify the sling rewriter status

versioned clientlibs verification
STEP-09: Configure IIS to send the right header to set a long TTL
Add the following to the IIS webservers system/web.server sectionGroup
STEP-09: Configure IIS to send the right header to set a long TTL
Add the following to the IIS webservers system/web.server sectionGroup
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
<add name="X-XSS-Protection" value="1; mode=block" />
<add name="X-Content-Type-Options" value="nosniff" />
<add name="Cache-Control" value="max-age=2592000" />
<add name="Strict-Transport-Security" value="max-age=31536000" />
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Methods" value="GET" />
<add name="Access-Control-Allow-Headers" value="Content-Type" />
</customHeaders>
</httpProtocol>

No comments:
Post a Comment
If you have any doubts or questions, please let us know.