We have CDN enabled on our website and we are seeing lot of errors w.r.t Media request protection like below:
ERROR MediaRequestProtection: An invalid/missing hash value was encountered. The expected hash value: 7364B46DCB96C3AC10AA02945E8D17D4. Media URL: /-/media/Feature/Blogs/image.jpg?rev=d4e6f5191f9549d5bc3f9efe96db7861, Referring URL: (empty)
As far as I understand about MRP, it is used to prevent an image resize vulnerability and Sitecore expects a generated hash value as query string to a media URL.
When the media requests are going to CDN, even if someone tries to alter the image properties it still serves the same from CDN. My question is do we need to handle all the images to have hash value or is it just safe to disable the media request logging with the setting - Media.RequestProtection.Logging.Enabled = false.
This error also occurs for all of the media assets like the optimized files under SXA themes. How do we handle such cases?