[Blazor] MapStaticAssets incorrectly re-encodes files when running the published output in the development environment. #56742
Labels
area-blazor
Includes: Blazor, Razor Components
bug
This issue describes a behavior which is not expected - a bug.
Milestone
We have a handler that runs in development to detect files that were added after the build step and serve them as static asset endpoints. We also have logic to gzip those files to serve the gzip version. This logic is only ever wired up when the environment is
Development
.When someone publishes their app and sets the environment to Development, the handler gets wired up and incorrectly re-encodes some of the already encoded brotli versions of the files.
This can happen when the app runs inside Visual Studio inside a Docker container using the
<ContainerDevelopmentMode>Regular</ContainerDevelopmentMode>
.There is a configuration value that can be set to avoid wiring up this behavior that takes precedence over the Development check.
We can do three things:
We don't expect people to do this outside of the docker scenario mentioned above, but we want to make sure we have some resolution for it.
The text was updated successfully, but these errors were encountered: