Skip to content

M4.S9.6e: Static file middleware via embedded-resource provider (UseStaticFiles on canister) #104

Description

@miadey

Surfaced by M4.S9.6 (#92). app.UseStaticFiles() relies on PhysicalFileProvider, which Wasp substitutes to a no-op (canister has no filesystem).

The agent's MvcVanilla sample worked around this with hand-rolled middleware that serves a single /css/site.css from an embedded resource.

The proper fix mirrors the Razor SSR fix in #52: an embedded-resource file provider that exposes wwwroot/** from the assembly manifest, so UseStaticFiles() Just Works on a canister.

Acceptance

app.UseStaticFiles() with wwwroot/css/site.css and wwwroot/favicon.ico shipped via <EmbeddedResource> glob returns 200 with the right bytes — no per-file middleware required.

Tracks: M4.S9.6 (#92).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions