Forum Discussion

delange's avatar
delange
Icon for Nimbostratus rankNimbostratus
Apr 18, 2022

Header rewrite for Azure BLOB storage

We have a virtual server configured to direct to an Azure BLOB storage site. Our requirement is that we are using a distinct DNS name rather than the Azure provided name (https://name.blob.core.windows.net). As configured with no iRule we receive an XML error...."Server encountered an internal error. Please try again after some time." According to Azure Storage admin the header response should be rewritten to the Azure URL. The following is what I've attempted via iRule with no luck.

when HTTP_REQUEST {
HTTP::header replace "ouruniquename"
}

when HTTP_RESPONSE {
HTTP::header replace Location [string map -nocase {ouruniquename azurename.blob.core.windows.net} [HTTP::header Location]]
}

Does anyone have some insight as to what I have incorrect?

Thanks!

  • Hi delange, 

    When you are talking about "header", what header are you talking about exactly? Looking at the HTTP_REQUEST iRule, you are not referring to any specific header, in the HTTP_RESPONSE, you are referring to the Location header? (which is more to do with redirects?)

    Alternatively, have you got any link to the Azure Blob info that may explain the issue in more detail? 

    Hope this helps.