-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[Blazor] Enable websocket compression for Blazor Server and Interactive Server components in Blazor web #53389
[Blazor] Enable websocket compression for Blazor Server and Interactive Server components in Blazor web #53389
Conversation
src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsServerTransport.cs
Outdated
Show resolved
Hide resolved
98298e4
to
e1b6ad1
Compare
src/Components/Server/src/Builder/ServerRazorComponentsEndpointConventionBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/Components/Server/src/Builder/ServerRazorComponentsEndpointConventionBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
Discussed offline, we have reached the conclusion that it is reasonable to restrict the framing to |
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.
Looks good to me, just some thoughts about the API and little nits here and there.
src/Components/Endpoints/src/Builder/RazorComponentEndpointFactory.cs
Outdated
Show resolved
Hide resolved
src/Components/Server/src/Builder/ServerComponentsEndpointOptions.cs
Outdated
Show resolved
Hide resolved
src/Components/Server/src/Builder/ServerRazorComponentsEndpointConventionBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/Components/Endpoints/src/Builder/RazorComponentEndpointFactory.cs
Outdated
Show resolved
Hide resolved
src/Components/Server/src/Builder/ServerRazorComponentsEndpointConventionBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/Components/Server/src/Builder/ServerComponentsEndpointOptions.cs
Outdated
Show resolved
Hide resolved
0d232ed
to
03f1079
Compare
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.
Let's talk
I've removed the signalr bits, and handled the setup internally to Blazor as we spoke
…ve Server components in Blazor web (dotnet#53389) * Enables websocket compression by default on interactive server components. * A new overload of `AddServerRenderMode` allows configuring the compression parameters as well as disabling it by setting the websocket callback to `null`. * The `ContentSecurityAncestorPolicy` limits the ability to render the app/page inside an iframe from different origins. It can be disabled by setting the value to null (for example, if the policy is configured elsewhere) or restricted even further providing the value 'none', to constrain the policy even further.
Fixes #35897 and is part of #38127
Enables websocket compression for interactive server components
frame-ancestors: 'none'
policy to block embedding the app inside an iframe when compression is enabled or a configuration for the websocket context has been provided.#53640 <- Docs issue for the security considerations