MIME types for Blazor Azure Storage deployments (#18507)
parent
4daa576c1a
commit
39fb77d0ba
|
@ -5,7 +5,7 @@ description: Learn how to host and deploy a Blazor app using ASP.NET Core, Conte
|
|||
monikerRange: '>= aspnetcore-3.1'
|
||||
ms.author: riande
|
||||
ms.custom: mvc
|
||||
ms.date: 05/19/2020
|
||||
ms.date: 05/27/2020
|
||||
no-loc: [Blazor, "Identity", "Let's Encrypt", Razor, SignalR]
|
||||
uid: host-and-deploy/blazor/webassembly
|
||||
---
|
||||
|
@ -165,6 +165,16 @@ When the blob service is enabled for static website hosting on a storage account
|
|||
* Set the **Index document name** to `index.html`.
|
||||
* Set the **Error document path** to `index.html`. Razor components and other non-file endpoints don't reside at physical paths in the static content stored by the blob service. When a request for one of these resources is received that the Blazor router should handle, the *404 - Not Found* error generated by the blob service routes the request to the **Error document path**. The *index.html* blob is returned, and the Blazor router loads and processes the path.
|
||||
|
||||
If files aren't loaded at runtime due to inappropriate MIME types in the files' `Content-Type` headers, take either of the following actions:
|
||||
|
||||
* Configure your tooling to set the correct MIME types (`Content-Type` headers) when the files are deployed.
|
||||
* Change the MIME types (`Content-Type` headers) for the files after the app is deployed.
|
||||
|
||||
In Storage Explorer (Azure portal) for each file:
|
||||
|
||||
1. Right-click the file and select **Properties**.
|
||||
1. Set the **ContentType** and select the **Save** button.
|
||||
|
||||
For more information, see [Static website hosting in Azure Storage](/azure/storage/blobs/storage-blob-static-website).
|
||||
|
||||
### Nginx
|
||||
|
@ -468,4 +478,4 @@ In the project file, the script is run after publishing the app:
|
|||
```
|
||||
|
||||
To provide feedback, visit [aspnetcore/issues #5477](https://github.com/dotnet/aspnetcore/issues/5477).
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue