-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[Blazor] Move to MapBlazorWebAssemblyApplication #19147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
javiercn
commented
Feb 19, 2020
- Blazor assets will be plugged in through endpoint routing.
- This is not the final design, but we want to get this in for preview2.
src/Components/WebAssembly/Server/src/ComponentsWebAssemblyEndpointRouteBuilderExtensions.cs
Show resolved
Hide resolved
src/Components/WebAssembly/Server/src/ComponentsWebAssemblyEndpointRouteBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
} | ||
}); | ||
|
||
appBuilder.UseStaticFiles(options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to check, what are the possible scenarios where this might conflict unexpectedly with other things a developer might be doing? Are they safe to have their own separate UseStaticFiles
calls with different options elsewhere?
Not saying it's the wrong design - just want to get my understanding right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to check, what are the possible scenarios where this might conflict unexpectedly with other things a developer might be doing? Are they safe to have their own separate
UseStaticFiles
calls with different options elsewhere?Not saying it's the wrong design - just want to get my understanding right.
Yes, you can have your own static files middleware and except for the case they are being mapped into the same subpath (or to "/") this should not interfere.
In the future, I want to flow the paths into the host so that it can map exactly the files the blazor app is meant to serve and nothing else. At that point there's no room for ever conflicting with the static files middleware.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
except for the case they are being mapped into the same subpath (or to "/") this should not interfere.
In the default "hosted" template case, if someone puts app.UseStaticFiles()
into their server project because they also want to serve static files from there (independently of their Blazor application), is this likely to result in any conflicts or unexpected behavior?
As long as it's not hugely disruptive it's probably OK for preview2, but just checking we know what to expect.
In the future, I want to flow the paths into the host so that it can map exactly the files the blazor app is meant to serve and nothing else.
Totally makes sense as a future enhancement.
…pointRouteBuilderExtensions.cs Co-Authored-By: Steve Sanderson <[email protected]>