Monday, February 3, 2025
HomeBusinessInternet BusinessAllowing CORS headers with .htaccess – M3Server Support

Allowing CORS headers with .htaccess – M3Server Support


Some VR players are requiring that you allow access to CORS in hearders in order for videos to play.

Example of error:

Your video is not loading due to CORS headers on your website.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://vrwebsite.com/media/videos/vrclip.mp4. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).”

CORS can be allowed by inserting below code into .htaccess in root directory of website.

/home/user/vrwebsite.com/.htaccess

ALWAYS MAKE A LOCAL BACKUP OF FILE FIRST

Header set Access-Control-Allow-Origin “*”

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments

Skip to toolbar