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

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

  • July 25, 2024
  • 3 replies
  • 1370 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

MukeshYadav_
Community Advisor
Community Advisor
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
Level 2
July 26, 2024

After changing it to ForceType still doesn't work. This is the latest code I added including the no cache. After the deployment on cloud was done, I clear cached and tried on incognito but the content type still not changing. 

<LocationMatch "\.(?i:wasm)$">
ForceType application/wasm
Header set Content-Disposition inline
Header unset Cache-Control
Header unset Expires
Header always set Cache-Control "no-cache,max-age=0"
Header set Age 0
</LocationMatch>
EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
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
Level 2
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. 

kautuk_sahni
Community Manager
Community Manager
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