Adds a new MapStaticAssetEndpoints routerware that reads a manifest generated at build / publish time and maps the endpoints defined in the manifest to the files in the application wwwroot folder.
Adds a MatcherPolicy to perform content negotiation based on the Accept-Encoding header. Compressed resources contain a ContentEncoding attribute in their metadata that is used to filter out the compressed asset to serve to the client based on the Accept-Encoding header.
The content encoding has an associated Quality value that represents the 'server preference' for the encoding. We always use the client preference and only rely on the server preference to break ties.
This process is completely driven by de the build and transparent to the runtime, if in the future we add support for zstd, sbr, etc. we don't need to change the runtime.
The logic for serving static files is borrowed from the static files middleware, with simplifications and additions. I've ported the relevant tests to ensure a high degree of compatibility.
The logic is new "routerware" instead of directly baked into the static files middleware because we do not want to pollute that middleware with more complex logic and we are going to be layering fingerprinting on top of this change, which will register more endpoints that will include more custom headers, which is not suitable for the static files middleware.
During development we wrap the endpoints we generate to support changing the files while the app is running (we recompute some of the values on the fly and also register a fallback route that matches file patterns to serve new files added while the app is running).
The build/publish process computes all the required information about the assets that is used to emit the response. The ETag and Last-Modified values are computed using the Base64(SHA256) hash of the content and the LastWrite on the file at build/publish time.
* Ship Microsoft.AspNetCore.WebUtilities as a package
* Update Microsoft.Net.Http.Headers.csproj
* Update SharedFx.props
* Add browser as a supported platform
* Adds the new Microsoft.AspNetCore.Components.Endpoints project for Server-Side Rendering components.
* Adds the structure for registering server side rendered Razor Component Endpoints.
* Adds a sample for Blazor United.
* Adds APIs for registering pages as endpoints and renders a static document for each page.
[main] Update dependencies from dotnet/efcore dotnet/runtime
- Add RateLimiting libraries to SharedFx
- Fix tests
- Update Microsoft.AspNetCore.App.Ref.csproj
- React to new exception type 51584ceecb
* Moved Microsoft.Extensions.Features
Moved /src/Http/Features/ to /src/Extensions/Features/
* Updated references to Microsoft.Extensions.Features
* Build.props includes update
* Update eng/Build.props
* Update eng/Build.props
* Update eng/Build.props
* Project List refresh using GenerateProjectList.ps1
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
* Adding logging
* Progress
* Logging
* nit
* Polishing HttpLogging
* Namespace and nit
* System
* Fix public API
* Feedback
* Big perf wins for response body
* Adds request body side
* Another API pass
* Combine request and response stream base type
* Fixing variable
* nit
* Updating samples
* Some feedback
* Small fixups
* API review feedback
* Tests working and most of the feedback
* rename
* Feedback
* bit more logging
* More overloads
* Fixing truncation
* Update src/Middleware/HttpLogging/src/HttpRequestLog.cs
Co-authored-by: Kahbazi <akahbazi@gmail.com>
* More tests and log headers later
* Test for invalid media type
* Logging request body if it isn't logged
* nit
* Update src/Middleware/HttpLogging/src/HttpResponseLog.cs
Co-authored-by: Kahbazi <akahbazi@gmail.com>
* Feedback
* Remove uneeded dep
* Removing mroe
* Abstractions?
* Targeting pack and comments
* Extra check
* Fixing tests
* Fixing tests
* All of that feedback
* Another round of feedback
* Override writeasync
* Feedback
* Fixing some small parts
* Fixing response buffering check
Co-authored-by: Kahbazi <akahbazi@gmail.com>
- Multi-target ObjectPool
- Move Embedded.Manifest.Task.Internal.Entry to the public namespace
- Remove ref assemblies from AspNetCore.Testing
- Skip TestPathUtilitiesTest since it's a pattern we want to migrate away from
- Fix FileProviders.Abstractions version in Embedded.*.nuspec
- Add workarounds for project references to FileProviders.Embedded
* Mark AspNetCore projects that aren't packaged explicitly
- avoid NU5104 warnings due to confusing versioning
- `$(IsShippingPackage)` was semantically incorrect in any case
* Remove redundant `$(IsShippingPackage)` settings in `$(IsAspNetCoreApp)` projects
- default is `true` for all implementation projects
* Use `$(IsPackable)` when deciding how `$(IsAspNetCoreApp)` projects are handled
- remove all use of `$(IsShippingPackage)` for shared framework composition
- update documentation to match these changes
nits:
- remove odd default for `$(IsPackable)` in Directory.Build.targets
- no longer relevant since all `$(IsAspNetCoreApp)` projects are `$(IsShippingPackage)` too
- include more information in docs/ProjectProperties.md
* Add direct System.Text.Json references
- avoid MSB3277 warnings
* Add empty Authorization src and test projects
* Add references
* Move auth types into .Authorization project
* Move auth tests
* Fix Mvc.ViewFeatures
* Remove the reference from .Web to .Authorization, so it's truly optional
* Add empty Forms src and test projects
* Remove dependencies from Components.csproj
* Move forms sources and tests
* Reference .Forms from .Web (needed unless we also have .Forms.Web)
* Rebase on #12936
* Update reference assemblies
* CR: Add Authorization namespace
* Update ref sources
* Add missing using
* Add another missing using
Fixes: #12245Fixes: #12630
This change removes stateful pre-rendering from Server-Side Blazor. This
means that when you render a component during the initial HTTP request,
we we will no longer preserve the component instances and their
parameters. While this feature was useful, it cause serious scalability
concerns.
This means that it will now be required to register "entry-point"
components in startup similar to client-side Blazor.
This is part of API review for Blazor. We're renaming these projects to
reflect the fact that they are for Blazor using web technologies (html
+css).
The old naming of .Browser of whether it meant client-side (in the
browser).
* Move contents of Microsoft.AspNetCore.Components.Services namespace to Microsoft.AspNetCore.Components
* Rename Components to Blazor
* Make Blazor server-side part of the shared framework.
Changes:
* Add support for a property, `IsAspNetCoreApp`, in the .csproj file of assemblies which are part of the shared framework.
* Remove unused dependencies
* Remove reference which have become part of 'netcoreapp3.0'