Azure CDN does not forward Accept header to origin

Peter Grainger 26 Reputation points
2021-10-18T14:23:48.507+00:00

When sending the Accept header in the request the origin never receives that header. All the other standard headers seem to make it. Is there a reason for this. I can't see it in the documentation anywhere.

Azure Content Delivery Network
{count} vote

Accepted answer
  1. suvasara-MSFT 9,996 Reputation points
    2021-10-21T14:55:18.277+00:00

    @Peter Grainger , Assuming the deployed CDN to be MS CDN. We do not support “Accept” headers, neither do we support “Accept-Charset” and “Accept-Language” headers. These headers will be removed when caching is enabled.

    We do support “Accept-Encoding” header but we only allow “gzip” and “br”. Also, we don’t have ETA yet on this feature request.

    ----------

    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

    1 person found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Nehemiah Jeyakumar 16 Reputation points
    2022-08-08T16:31:16.367+00:00

    Accept Headers are not getting forwarded from Azure CDN (MS). This prevents us to know whether the browser accepts the next generation image formats. Is there any place where we can track this feature request?

    3 people found this answer helpful.
    0 comments No comments

  2. Jon Edmiston 6 Reputation points
    2022-06-01T18:19:59.423+00:00

    We've run into this same problem. It's causing issues as the backend needs to know what language the client is using when posting back dates.

    1 person found this answer helpful.
    0 comments No comments

  3. Mikhail Babich 1 Reputation point
    2022-11-01T21:51:05.29+00:00

    We have the same problem.
    We are using the next js project with a Next/Image component to generate the appropriate images on the fly using the "Accept" image formats from the clients browser. The problem is that Azure CDN (MS) doesn't pass the 'Accept' header. We tried to create some "rules engine" conditions for this, but for a while it works, and for some it doesn't :(

    The Case:

    We have the image path:
    domain.com/_next/image?url=im.jpeg

    For Chrome it returns the image in the format: im.avif
    For Edge it returns the image in the format: im.webp

    With Azure CDN (MS) this case does not work :(

    @suvasara-MSFT do you have any ideas how to use the CDN in this case?


  4. Nehemiah Jeyakumar 16 Reputation points
    2022-12-06T16:09:18.52+00:00

    Use CDN rule engine and pass on the allowed mime type via different header name and let the application read the custom header value and generate the next gen image formats.

    https://www.nehemiahj.com/2022/08/sitecore-dianoga-with-azure-cdn.html

    0 comments No comments