Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!
SOLVED

Dispatcher is not caching when Basic Auth is enabled

Avatar

Level 6

I have enabled basic auth from dispatcher for our dev and stage server.
But its not caching content when basic auth is enabled.

If I disable basic auth then it works. For basic auth I have added following code on dispatcher

<Directory "${PUBLISH_DOCROOT}">
<If "req('Host') =~ /(dev|stage)\.example\.com/">
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/httpd/.htpasswd
Require valid-user
</If>
<Else>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Else>
</Directory>
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @kaikubad ,

 

You need to set /allowAuthorized "1" in your dispatcher config.

 

ChitraMadan_0-1675939732511.png

 

 

Thanks,

Chitra

View solution in original post

6 Replies

Avatar

Level 6

@SivakumarKanoori 

Its not the path I have chosen. and yes the configuration is enabled on publish.

Avatar

Community Advisor

Can you validate you response headers for authorisation  and that perticular header is enable for caching or not in your dispatcher.any file.

Hope this helps

Umesh Thakur

Avatar

Correct answer by
Community Advisor

Hi @kaikubad ,

 

You need to set /allowAuthorized "1" in your dispatcher config.

 

ChitraMadan_0-1675939732511.png

 

 

Thanks,

Chitra