Try to add http response header on server | Community
Skip to main content
August 31, 2022
Solved

Try to add http response header on server

  • August 31, 2022
  • 2 replies
  • 2199 views

Dear community,

 

The web (AEM 6.5.5) we've developed has to add "Accept-Ranges": "bytes" to response header

so the HTML5 video element can work on Safari. And I can't manage to add/edit the http header.

 

What I've found so far: 

 

Custom HTTP Headers :

Go to the Cloud Service configuration page in Tools -> Cloud Services -> CIF Configuration

=> There is no CIF Configuration on our Cloud Service, is this CIF Config missing in AEM 6.5 and where could I enable it?

 

How-to Add Custom Headers To Dispatcher 

Go to /etc/httpd/conf folder and open the file clientheaders.any file...

=> Cannot find the folder on my author and publish, does any one know where to find this folder?

 

Any ideas / thoughts will be very appreciated!

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Chandra_Hire

Hi @yusheng ,

CIF (Commerce Integration Framework) is an add-on service (part of content & commerce to integrate external commerce engine like Magento) to be procured separately. Please refer "Installation and Updates" section. 

 

However, your use case not seems to be an integration with any eCommerce solution so I believe, integrating CIF will not be the right solution. Instead, need to find browser specific solution which may need to embed at template/component/dispatcher level. Please check if this helps.

HTML5 Video tag not working in Safari , iPhone and iPad - Stack Overflow

2 replies

Chandra_Hire
Chandra_HireAccepted solution
August 31, 2022

Hi @yusheng ,

CIF (Commerce Integration Framework) is an add-on service (part of content & commerce to integrate external commerce engine like Magento) to be procured separately. Please refer "Installation and Updates" section. 

 

However, your use case not seems to be an integration with any eCommerce solution so I believe, integrating CIF will not be the right solution. Instead, need to find browser specific solution which may need to embed at template/component/dispatcher level. Please check if this helps.

HTML5 Video tag not working in Safari , iPhone and iPad - Stack Overflow

YuShengAuthor
August 31, 2022

Thank you Chandra_Hire, I did check the article and put those attributes in my element, and it didn't work. Then I checked the Response header in Safari, found that there's no accept-ranges, which seems to be fundamental for playing .mp4 in Safari. 

Chandra_Hire
August 31, 2022

Hi @yusheng ,
Please refer below community answer where "Content-Security-Policy script-src" added. Similarly, you can add "Accept-Ranges" response header in your use case. Please check if that helps.

Solved: Adding a response header to specific resources - Adobe Experience League Community - 397949

Saravanan_Dharmaraj
Community Advisor
Community Advisor
August 31, 2022

Go to /etc/httpd/conf folder and open the file clientheaders.any file...

=> Cannot find the folder on my author and publish, does any one know where to find this folder?

 

Regarding that ^^, the clientheader.any file will be in dispatcher server file system ,not in auth/pub JCR instance.  You can add additional custom headers in that file.

YuShengAuthor
September 1, 2022

Thank you for the information!