Expand my Community achievements bar.

Link Header for PDFs not working in Dev and Stage Environment

Avatar

Level 2

Hi everyone,

We are using AEM as a Cloud Service. I'm trying to set the Link header for PDFs using the following Apache configuration:

 

 

<LocationMatch "\.(?i:pdf)$">
  ForceType application/pdf
  Header set Content-Disposition inline
  RewriteRule ^ - [E=FILENAME:https://%{HTTP_HOST}%{REQUEST_URI}]
  Header set Link '<%{FILENAME}e>; rel="canonical"'
</LocationMatch>

 

 

 

The code works in my local environment but not in dev. I've verified serverName and serverAlias are correct. Any help resolving this issue would be appreciated!

The expected result should be like below image:

mahi_369_0-1712592352743.png

 

UpdateAbove apache configuration is working for AMS in dev and stage environment. However, It's not working for AEM as a cloud services in dev and stage environments.

 

Thanks


Hi @Raja_Reddy @SureshDhulipudi @aanchal-sikka 
Any idea about this isssue?

4 Replies

Avatar

Community Advisor

Hi, 

What are you getting instead? Are you sure you are not seeing a cache version of the asset?



Esteban Bustamante

Thanks for your reply @EstebanBustamante  !!

Actually I should able to see the Link response header like below in dev environment. Below screenshot represents my local server Response header

mahi_369_4-1712614106393.png

 

 

However, I could not see any Link header in dev environment's apache server like in my local server. Please look at below screenshot

mahi_369_3-1712614093655.png

 

 


Yes, I am sure that I am not able to see any cached version of asset .

Thanks  

Avatar

Level 2

Hi @EstebanBustamante 
FYI,  Above apache configuration is working for AMS in dev and stage environment. However, It's not working for AEM as a cloud services in dev and stage environments.

Avatar

Level 2

hi,

were you able to find solution for this issue ?

Thanks!