fix: refine condition for serving static files in development environment

This commit is contained in:
Marek Lesko
2025-10-31 14:30:47 +00:00
parent 9683b069af
commit a6c31bb93b

View File

@@ -77,7 +77,7 @@ namespace Api
app.UseRewriter(rewriteOptions);
// Serve static files from the Angular app
if (app.Environment.IsDevelopment())
if (app.Environment.IsDevelopment() && Directory.Exists(Path.Combine(Directory.GetCurrentDirectory(), "../Web/dist/Web/browser")))
{
var currentDirectory = Directory.GetCurrentDirectory();
var staticFilePath = Path.Combine(currentDirectory, "../Web/dist/Web/browser");