fix: restore WASM static file serving configuration
Reverted breaking changes from commit08b002d(2026-07-04 20:28): 1. UseStaticFiles path mapping (reverted): - Before (c960860- working): app.UseStaticFiles("/admin") - After (08b002d): app.UseStaticFiles(new StaticFileOptions { RequestPath = "/admin" }) - Now (fixed): app.UseStaticFiles("/admin") ✅ 2. Removed MapRazorComponents (blocking WASM): - app.MapRazorComponents<...>() was interfering with static file serving - Blazor WebAssembly should be pure static WASM, not server-side - Removed in favor of MapFallbackToFile pattern ✅ 3. Restored portal fallback: - Added app.MapFallbackToFile("portal/{*path:nonfile}", "portal/index.html") - Added root redirect: app.MapGet("/", ...) 4. Fixed index.html script path: - Before: <script src="/_framework/blazor.webassembly.js"></script> (absolute) - After: <script src="_framework/blazor.webassembly.js"></script> (relative) - Relative path respects base href="/taxbaik/admin/" ✅ **Verification:** - WASM files (45KB+): ✅ Present, correct hash - Server delivery: ✅ 200 OK, correct SHA-256 - Static file serving: ✅ /taxbaik/admin/_framework/* accessible - Issue: blazor.boot.json still missing (blocks WASM initialization) **Status:** - Login form: ✅ Renders - WASM bootstrap script: ✅ Loads (with relative path fix) - WASM runtime: ❌ Blocked (needs blazor.boot.json) - Dashboard: ❌ Loading indefinitely Next: Investigate why blazor.boot.json is not generated in Debug build. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,6 @@
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
|
||||
<script src="/_framework/blazor.webassembly.js"></script>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user