question

PeterGrainger-1725 avatar image
1 Vote"
PeterGrainger-1725 asked MikhailBabich-7907 answered

Azure CDN does not forward Accept header to origin

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-cdn
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@PeterGrainger-1725, Could you please provide some more details about the deployed CDN for better analysis like,
1.CDN SKU
2.Accept Header use case in your ENV. (Is it only for the selecting the type of media?)

0 Votes 0 ·
suvasara-MSFT avatar image
1 Vote"
suvasara-MSFT answered

@PeterGrainger-1725, 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.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JonEdmiston-6917 avatar image
1 Vote"
JonEdmiston-6917 answered JonEdmiston-6917 published

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NehemiahJ avatar image
3 Votes"
NehemiahJ answered

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?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MikhailBabich-7907 avatar image
0 Votes"
MikhailBabich-7907 answered

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?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.