fix: Add explicit MIME type configuration for static files
Deploy to Production / Build & Deploy to Production (push) Failing after 59s
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 10s
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Failing after 8s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
Deploy to Production / Build & Deploy to Production (push) Failing after 59s
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 10s
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Failing after 8s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
- Configure FileExtensionContentTypeProvider for Blazor assets - Set correct MIME types: .wasm, .js, .mjs, .json, .svg, .woff, .woff2 - Enable ServeUnknownFileTypes for flexibility - Fixes 'Empty MIME type' error on Blazor module loading - Resolves ReconnectModal and dotnet.js loading failures MIME type mapping: - .wasm → application/wasm - .js → application/javascript - .mjs → application/javascript - .json → application/json - .svg → image/svg+xml - .woff → font/woff - .woff2 → font/woff2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ using QuantEngine.Core.Interfaces;
|
||||
using QuantEngine.Application.Services;
|
||||
using QuantEngine.Application.Interfaces;
|
||||
using System.Text.Json;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
using static QuantEngine.Application.Services.DataCollectionService;
|
||||
using Serilog;
|
||||
using QuantEngine.Web.Client.Infrastructure;
|
||||
@@ -121,6 +122,23 @@ app.UseStatusCodePages(async ctx =>
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
// Configure static file MIME types for Blazor
|
||||
var provider = new FileExtensionContentTypeProvider();
|
||||
provider.Mappings[".wasm"] = "application/wasm";
|
||||
provider.Mappings[".js"] = "application/javascript";
|
||||
provider.Mappings[".mjs"] = "application/javascript";
|
||||
provider.Mappings[".json"] = "application/json";
|
||||
provider.Mappings[".svg"] = "image/svg+xml";
|
||||
provider.Mappings[".woff"] = "font/woff";
|
||||
provider.Mappings[".woff2"] = "font/woff2";
|
||||
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
ContentTypeProvider = provider,
|
||||
ServeUnknownFileTypes = true,
|
||||
DefaultContentType = "application/octet-stream"
|
||||
});
|
||||
|
||||
app.UseAntiforgery();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -5,7 +5,7 @@ var e=!1;const t=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,
|
||||
"mainAssemblyName": "QuantEngine.Web.Client",
|
||||
"applicationEnvironment": "Development",
|
||||
"resources": {
|
||||
"hash": "sha256-GF7r7nIOeI3J063bMscMxkHPkyz0z2peQDukfM6M9AA=",
|
||||
"hash": "sha256-BbBW2IDSn0CdFcShrDBJDn0eBaTMXAiaarfp1y6lFWk=",
|
||||
"jsModuleNative": [
|
||||
{
|
||||
"name": "dotnet.native.ikrs475e5v.js"
|
||||
@@ -1254,14 +1254,14 @@ var e=!1;const t=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,
|
||||
},
|
||||
{
|
||||
"virtualPath": "QuantEngine.Application.wasm",
|
||||
"name": "QuantEngine.Application.9qbkx9qe02.wasm",
|
||||
"hash": "sha256-n+LsYnNV5pamOyWoF7751imN+T6/3o/betNZTmDBIm8=",
|
||||
"name": "QuantEngine.Application.n4x9btwro5.wasm",
|
||||
"hash": "sha256-906kYBkYAJkZ80yppIUgSbv1/wGdYrbGBn8QhpAJfr4=",
|
||||
"cache": "force-cache"
|
||||
},
|
||||
{
|
||||
"virtualPath": "QuantEngine.Core.wasm",
|
||||
"name": "QuantEngine.Core.fjtcuzx1xx.wasm",
|
||||
"hash": "sha256-dUUtuk/3Sq+D/HHVdY3qc1fEYvcEjMsrPhWZbxZiuzk=",
|
||||
"name": "QuantEngine.Core.i44o8ctubr.wasm",
|
||||
"hash": "sha256-Hs1Kn2eitkbbEFeAJgeoc9vfF1zyWpqJ7SvCTk32ct8=",
|
||||
"cache": "force-cache"
|
||||
},
|
||||
{
|
||||
@@ -1272,28 +1272,28 @@ var e=!1;const t=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,
|
||||
},
|
||||
{
|
||||
"virtualPath": "QuantEngine.Web.Client.wasm",
|
||||
"name": "QuantEngine.Web.Client.46e6s1s51k.wasm",
|
||||
"hash": "sha256-xDLl5C/imN2X6hA/ZRehlbT7FiFksdwYU2yHv8FBK3U=",
|
||||
"name": "QuantEngine.Web.Client.pdma2c1xbe.wasm",
|
||||
"hash": "sha256-zdGCsCDg32wjxUCzPmUpZVMYNDMuL1vgELQb8vKxLGA=",
|
||||
"cache": "force-cache"
|
||||
}
|
||||
],
|
||||
"pdb": [
|
||||
{
|
||||
"virtualPath": "QuantEngine.Core.pdb",
|
||||
"name": "QuantEngine.Core.svjnfkgy0u.pdb",
|
||||
"hash": "sha256-mHzMWzrz2+iHyGpoMNApxy6akFJhGvAuQ4s2zpheP+s=",
|
||||
"name": "QuantEngine.Core.b5f9o8o2rh.pdb",
|
||||
"hash": "sha256-ERM43ExyTsX4AW+yYK1fSfBUMXaXmvvaJ1cIeR/SCiw=",
|
||||
"cache": "force-cache"
|
||||
},
|
||||
{
|
||||
"virtualPath": "QuantEngine.Application.pdb",
|
||||
"name": "QuantEngine.Application.7revtw31g8.pdb",
|
||||
"hash": "sha256-jXaCcUqetbTVj0fTCW4soVlUrGJrHE5Yzb1aVyhayX8=",
|
||||
"name": "QuantEngine.Application.kv7x4sl21n.pdb",
|
||||
"hash": "sha256-4BWS2CnkvmzfOpWqZLkmWCs4mxeHLul3OrN6abwzAtU=",
|
||||
"cache": "force-cache"
|
||||
},
|
||||
{
|
||||
"virtualPath": "QuantEngine.Web.Client.pdb",
|
||||
"name": "QuantEngine.Web.Client.m7znbxtyme.pdb",
|
||||
"hash": "sha256-/o7OFFiYQrm0GzWXW1CJtBjVW2egit6y5bsgQqmw2Sk=",
|
||||
"name": "QuantEngine.Web.Client.97rik53991.pdb",
|
||||
"hash": "sha256-NZJNG8Bfp8VRV7LXzXQm+NDBra0TwYyOvgMTwrcoHA0=",
|
||||
"cache": "force-cache"
|
||||
}
|
||||
],
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user