Azure Blob Storage CDN Asked for favicon.ico when none exists?

1k Views Asked by At

How can favicon.ico be served to browsers making requests to a public Blob Storage Container?

For a publicly-accessible Container at blahblah.blob.core.windows.net, a CDN endpoint was created and SSL cert attached so anyone can get to blobs at https://placeiwant.somewhere/bloblocation/etc/etc/mything.jpg. That works fine.

I noticed in the CDN logs that a browser is looking for https://placeiwant.somewhere/favicon.ico. That file does not exist, and if I point my browser to that URI, I get this error message:

<?xml version="1.0" encoding="ISO-8859-1"?>
<Error>
<Code>OutOfRangeInput</Code>
<Message>One of the request inputs is out of range. RequestId:nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn Time:2020-09-10T13:47:48.5273562Z</Message>
</Error>

In addition to Container, I also have a static website set up in $web with CDN layered on top at https://webplaceiwant.somewhere, and a favicon.ico exists there, but I do not see a way to have that favicon.ico served when https://placeiwant.somewhere/ is accessed.

Thanks.

1

There are 1 best solutions below

4
On

Generally, the web server will request the favicon.icofile when loading websites. When the CDN request responds to 400 error. I also could reproduce this error message displays when a browser is looking for https://placeiwant.somewhere/favicon.ico. It looks like it's an expected result.

For the static website set up in $web container with CDN. You can just place this favicon.ico file under the $web container.

enter image description here

When you browse the static website's primary endpoint, you will see the icon.

enter image description here

If this does not work for you. You can try to create a storage account v2 via the Azure portal because I have another storage account created by terraform that also appears this issue even I place the same static websites.