remove commented code and add SignalR options
This commit is contained in:
parent
c66982c9bc
commit
9fe54c5d21
|
@ -68,18 +68,6 @@ namespace Oqtane
|
||||||
services.AddOptions<List<Database>>().Bind(Configuration.GetSection(SettingKeys.AvailableDatabasesSection));
|
services.AddOptions<List<Database>>().Bind(Configuration.GetSection(SettingKeys.AvailableDatabasesSection));
|
||||||
services.Configure<HostOptions>(opts => opts.ShutdownTimeout = TimeSpan.FromSeconds(10)); // increase from default of 5 seconds
|
services.Configure<HostOptions>(opts => opts.ShutdownTimeout = TimeSpan.FromSeconds(10)); // increase from default of 5 seconds
|
||||||
|
|
||||||
//services.AddServerSideBlazor()
|
|
||||||
// .AddCircuitOptions(options =>
|
|
||||||
// {
|
|
||||||
// if (_env.IsDevelopment())
|
|
||||||
// {
|
|
||||||
// options.DetailedErrors = true;
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// .AddHubOptions(options => {
|
|
||||||
// options.MaximumReceiveMessageSize = null; // no limit (for large amnounts of data ie. textarea components)
|
|
||||||
// });
|
|
||||||
|
|
||||||
// setup HttpClient for server side in a client side compatible fashion ( with auth cookie )
|
// setup HttpClient for server side in a client side compatible fashion ( with auth cookie )
|
||||||
services.AddHttpClients();
|
services.AddHttpClients();
|
||||||
|
|
||||||
|
@ -153,7 +141,16 @@ namespace Oqtane
|
||||||
.ConfigureOqtaneMvc(); // any additional configuration from IStartup classes
|
.ConfigureOqtaneMvc(); // any additional configuration from IStartup classes
|
||||||
|
|
||||||
services.AddRazorComponents()
|
services.AddRazorComponents()
|
||||||
.AddInteractiveServerComponents()
|
.AddInteractiveServerComponents(options =>
|
||||||
|
{
|
||||||
|
if (_env.IsDevelopment())
|
||||||
|
{
|
||||||
|
options.DetailedErrors = false;
|
||||||
|
}
|
||||||
|
}).AddHubOptions(options =>
|
||||||
|
{
|
||||||
|
options.MaximumReceiveMessageSize = null; // no limit (for large amnounts of data ie. textarea components)
|
||||||
|
})
|
||||||
.AddInteractiveWebAssemblyComponents();
|
.AddInteractiveWebAssemblyComponents();
|
||||||
|
|
||||||
services.AddSwaggerGen(options =>
|
services.AddSwaggerGen(options =>
|
||||||
|
@ -208,14 +205,7 @@ namespace Oqtane
|
||||||
app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/" + Constants.Version + "/swagger.json", Constants.PackageId + " " + Constants.Version); });
|
app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/" + Constants.Version + "/swagger.json", Constants.PackageId + " " + Constants.Version); });
|
||||||
}
|
}
|
||||||
|
|
||||||
//app.UseEndpoints(endpoints =>
|
//app.UseAntiforgery();
|
||||||
//{
|
|
||||||
// endpoints.MapBlazorHub();
|
|
||||||
// endpoints.MapControllers();
|
|
||||||
// endpoints.MapFallbackToPage("/_Host");
|
|
||||||
//});
|
|
||||||
|
|
||||||
app.UseAntiforgery();
|
|
||||||
app.UseEndpoints(endpoints =>
|
app.UseEndpoints(endpoints =>
|
||||||
{
|
{
|
||||||
endpoints.MapControllers();
|
endpoints.MapControllers();
|
||||||
|
@ -225,8 +215,7 @@ namespace Oqtane
|
||||||
{
|
{
|
||||||
endpoints.MapRazorComponents<App>()
|
endpoints.MapRazorComponents<App>()
|
||||||
.AddInteractiveServerRenderMode()
|
.AddInteractiveServerRenderMode()
|
||||||
.AddInteractiveWebAssemblyRenderMode()
|
.AddInteractiveWebAssemblyRenderMode();
|
||||||
.AddAdditionalAssemblies(typeof(SiteRouter).Assembly);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
app.UseEndpoints(endpoints =>
|
app.UseEndpoints(endpoints =>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user