Skip to content

MapStaticAssets and Minimal APIs not working as expected #58937

@benjaminsampica

Description

@benjaminsampica

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I am having issues using .MapStaticAssets() with minimal apis that return RazorComponentResult<T>. The static assets are being returned as they did with .UseStaticFiles(), but all of the great features that are supposed to come with MapStaticAssets don't appear to be working as I expect.

Expected Behavior

I expect the cache busting and compression features to work. It appears that the ETag feature is working.

Steps To Reproduce

Here is a link to the GitHub repository where it has been reproduced.

Please just pull the app and run it and observe the networking tab.

Exceptions (if any)

No response

.NET Version

9.0.100

Anything else?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions