Set Content Type not working on AEM cloud Dev author/publish | Community
Skip to main content
New Participant
July 25, 2024

Set Content Type not working on AEM cloud Dev author/publish

  • July 25, 2024
  • 3 replies
  • 1369 views

Hi,

 

I'm trying to set the content type of .wasm files to "application/wasm" by adding this code on the project's ../available_vhosts/.vhost file. Here's the code I'm referring to:

<LocationMatch "\.(?i:wasm)$">
Header Set Content-Type application/wasm
Header set Content-Disposition inline
</LocationMatch>

On my local, this work perfectly fine. I can see the content type changes to "application/wasm" but when I'm pushing this code to dev, it seems like it doesn't take any effect at all. Any idea what could be the issue? Any help is greatly appreciated. Thanks!

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

3 replies

kautuk_sahni
Employee
August 1, 2024

@zmdeluyas Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni
EstebanBustamante
New Participant
July 25, 2024

Hi, 

Double check the changes are reflected in the "../enabled_vhosts/.vhost" file, and make sure you are not seeing cached content, try it on an incognito window. 

Esteban Bustamante
zmdeluyasAuthor
New Participant
July 25, 2024

I have tried to clear cache, incognito and other browsers but it's really not working. Also, my changes is reflected on ../enabled_vhosts/.vhost which means the symlink I created is valid. 

MukeshYadav_
New Participant
July 25, 2024

Hi @zmdeluyas ,

If it is AEM cloud hope dispatcher deployment happened which we miss sometimes.

Also you may try ForceType mentioned in below thred

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/content-disposition-on-aem-as-cloud/m-p/435636

Hope apache restarted.

Also if file might have been cached without header then it might be serving from cache

 

Thanks

zmdeluyasAuthor
New Participant
July 25, 2024

Yes, the environment is on AEM cloud. I'm pretty sure we are running dispatcher pipeline and with no issues. I'll try using the force type you have mentioned. I tried this on my local but it doesn't work so hopefully on cloud it works. Also I added no cache for wasm as well.