I am not sure how the web application was configured. But you can use the below concept of code that might be help you to access the blob files or images over website without displaying the SAS URL in your request Header.
Reference piece of code:- Download and display a private Azure Blob using ASP MVC
Additional References:
Couple of points to note: 1) Make sure to set the correct content type (Or Mime Type) 2) Don't use any streaming APIs (i.e.
file stream) - those will by default download the files 3) If
possible try to add the right header (if needed)
Below is the whole source code (it's the controller part )
//ViewModel
public class ViewModel
{
public string FileUrl { get; set; }
}
{
var readPolicy = new SharedAccessBlobPolicy()
{
Permissions = SharedAccessBlobPermissions.Read,
SharedAccessExpiryTime = DateTime.UtcNow + TimeSpan.FromMinutes(5)
};
// Retrieve storage account from connection string.
string conn = "DefaultEndpointsProtocol=https;AccountName=straccountname;AccountKey=key==;EndpointSuffix=core.windows.net";
Microsoft.WindowsAzure.Storage.CloudStorageAccount storageAccount = CloudStorageAccount.Parse(conn);
// Create the blob client.
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
// Retrieve reference to a previously created container.
CloudBlobContainer container = blobClient.GetContainerReference("test");
// Retrieve reference to a blob ie "20200809_125724.jpg".
CloudBlockBlob blockBlob = container.GetBlockBlobReference("20200809_125724.jpg");
//------
var newUri = new Uri(blockBlob.Uri.AbsoluteUri + blockBlob.GetSharedAccessSignature(readPolicy));
var viewModel = new ViewModel()
{
FileUrl = newUri.ToString()
};
return View("Index", viewModel);
// return View();
}
Reference: https://learn.microsoft.com/en-us/answers/questions/252303/sas-url-to-display-in-browser-rather-than-download.html