Skip to content

Commit

Permalink
Merge branch 'rel-1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
stsrki committed Feb 14, 2024
2 parents 5b79f67 + 30469fc commit d1b5756
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Documentation/Blazorise.Docs.Server/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ public void ConfigureServices( IServiceCollection services )
// Add services to the container.
services
.AddRazorComponents()
.AddInteractiveServerComponents();
.AddInteractiveServerComponents().AddHubOptions( options =>
{
options.MaximumReceiveMessageSize = 1024 * 1024 * 100;
} );

services.AddHttpContextAccessor();

Expand Down Expand Up @@ -105,7 +108,10 @@ public void ConfigureServices( IServiceCollection services )
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure( WebApplication app )
{
app.UseResponseCompression();
if ( !app.Environment.IsDevelopment() )
{
app.UseResponseCompression();
}

if ( !app.Environment.IsDevelopment() )
{
Expand Down
25 changes: 25 additions & 0 deletions Documentation/Blazorise.Docs/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,30 @@
<script src="_content/Blazorise.Docs/blazorise.docs.min.js?v=1.4.2.0"></script>

<script src="_framework/blazor.web.js" suppress-error="BL9992"></script>

<script>
Blazor.start({
reconnectionHandler: {
onConnectionDown: (options, error) => {
var isReloading = false;
async function attemptReload() {
if (!isReloading) {
isReloading = true;
var request = new Request({
url: '/healthcheck',
method: 'GET'
});
var result = await fetch(request);
if (result.status == 200) {
document.location.reload();
}
isReloading = false;
}
}
setInterval(attemptReload, 1500);
}
}
});
</script>
</body>
</html>

0 comments on commit d1b5756

Please sign in to comment.