2021年3月9日星期二

Is there a way to add "X-Robots-Tag: noindex" header to pdf files served on Azure CDN

Just wondering if there is a way to add the "X-Robots-Tag: noindex" tag specifically to PDFs that are served from azure blob storage via an azureedge CDN url. For example -

Blob Storage URL - {subdomain}.blob.core.windows.net/container/test.pdf

CDN URL - {subdomain}.azureedge.net/container/test.pdf

I have read in some places that a way to do this is to add a robots.txt file to the $root container on the blob storage and set "Disallow: *.pdf", however it states that this is not completely reliable and I would rather set the X-Robots-Tag header. Is there a way in azure portal to set it up so that any "*.pdf" file being requested via either the blob or CDN url automatically has this header added to the response?

Many thanks in advance

https://stackoverflow.com/questions/66533546/is-there-a-way-to-add-x-robots-tag-noindex-header-to-pdf-files-served-on-azur March 09, 2021 at 12:30AM

没有评论:

发表评论