Link Header for PDFs not working in Dev and Stage Environment | Adobe Higher Education
Skip to main content
Level 2
April 8, 2024

Link Header for PDFs not working in Dev and Stage Environment

  • April 8, 2024
  • 1 respuesta
  • 905 visualizaciones

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:

 

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?

Este tema ha sido cerrado para respuestas.

1 respuesta

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 8, 2024

Hi, 

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

Esteban Bustamante
Level 2
April 8, 2024

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

 

 

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

 

 


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

Thanks 🙂 

Level 2
April 10, 2024

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.