fix(web): serve native agent Python supervisor (#140)
Heimdall Gitea / Detect CI scope (push) Successful in 6s
Heimdall Gitea / Build and tests (push) Successful in 22m48s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and scan server image (push) Successful in 8m18s
Heimdall Gitea / Build and scan agent image (push) Successful in 20m1s
Heimdall Gitea / Publish Docker Hub latest tags (push) Successful in 2m15s
Heimdall Gitea / CI policy (push) Successful in 12s
Heimdall Gitea / Detect CI scope (push) Successful in 6s
Heimdall Gitea / Build and tests (push) Successful in 22m48s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and scan server image (push) Successful in 8m18s
Heimdall Gitea / Build and scan agent image (push) Successful in 20m1s
Heimdall Gitea / Publish Docker Hub latest tags (push) Successful in 2m15s
Heimdall Gitea / CI policy (push) Successful in 12s
## Résumé Ajoute le type MIME `text/x-python` au middleware statique Central. Sans cette association, ASP.NET Core renvoie 404 pour le superviseur Linux `.py` même si le fichier figure dans le publish. ## Validation - Recette Compose jetable source : `/healthz` sain; `install-agent.sh` et `agent-supervisor.py` répondent 200 et sont identiques aux sources. - Teardown vérifié : 0 conteneur, volume, réseau; tag unique supprimé et absent. - `git diff --check` passé. La vérification de l’instance publique reste requise après publication de l’image et redémarrage de Central. Reviewed-on: #140 Co-authored-by: Arnaud Dartois <admin@tordais.cc>
This commit was merged in pull request #140.
This commit is contained in:
1 parent
c6da6195c9
commit
6e61d38ca8
8 files changed
+57
-3
No files matched your search
@@ -25,6 +25,7 @@ using Microsoft.AspNetCore.Localization;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.AspNetCore.RateLimiting;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
using OpenTelemetry.Metrics;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
@@ -802,7 +803,12 @@ public partial class Program
|
||||
app.UseHttpsRedirection();
|
||||
}
|
||||
|
||||
app.UseStaticFiles();
|
||||
var staticFileContentTypes = new FileExtensionContentTypeProvider();
|
||||
staticFileContentTypes.Mappings[".py"] = "text/x-python";
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
ContentTypeProvider = staticFileContentTypes,
|
||||
});
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.UseAntiforgery();
|
||||
|
||||
Reference in new issue
Block a user