-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Including MapStaticAssets() in my dev environment within a Docker container will cause POST requests to return 405 HTTP Method Not Supported. Removing that one line of code fixes the issue. I have zero assets for dev, but a few for prod, and a different docker setup, but it all works perfectly there.
Expected Behavior
MapStaticAssets() should not break endpoint routing (unless there is some naming conflict of files/paths)
Steps To Reproduce
Sorry I have no time for a simple repro, so this is all I have. https://github.com/bradmarder/LootGod
I normally just run docker compose watch to start it all up, and it seems any POST request will fail.
Exceptions (if any)
405 HTTP Method Not Supported
.NET Version
9.0.102
Anything else?
It took me quite a bit of time to figure out MapStaticAssets() was causing the issue, especially since the error and symptoms and diagnosing process were all so weird. Also I'm using a WebApplicationFactory and HttpClient to run tests on every endpoint, and they all pass.