|
|
|
@ -531,21 +531,36 @@ public class Startup |
|
|
|
// ServeUnknownFileTypes = true
|
|
|
|
// ServeUnknownFileTypes = true
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
app.UseRouting(); |
|
|
|
app.MapWhen( |
|
|
|
|
|
|
|
ctx => !ctx.Request.Path.StartsWithSegments("/iptv"), |
|
|
|
|
|
|
|
blazor => |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
blazor.UseRouting(); |
|
|
|
|
|
|
|
|
|
|
|
if (OidcHelper.IsEnabled) |
|
|
|
if (OidcHelper.IsEnabled) |
|
|
|
{ |
|
|
|
{ |
|
|
|
app.UseAuthentication(); |
|
|
|
blazor.UseAuthentication(); |
|
|
|
app.UseAuthorization(); |
|
|
|
#pragma warning disable ASP0001
|
|
|
|
|
|
|
|
blazor.UseAuthorization(); |
|
|
|
|
|
|
|
#pragma warning restore ASP0001
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
app.UseEndpoints( |
|
|
|
blazor.UseEndpoints( |
|
|
|
endpoints => |
|
|
|
endpoints => |
|
|
|
{ |
|
|
|
{ |
|
|
|
endpoints.MapControllers(); |
|
|
|
endpoints.MapControllers(); |
|
|
|
endpoints.MapBlazorHub(); |
|
|
|
endpoints.MapBlazorHub(); |
|
|
|
endpoints.MapFallbackToPage("/_Host"); |
|
|
|
endpoints.MapFallbackToPage("/_Host"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.MapWhen( |
|
|
|
|
|
|
|
ctx => ctx.Request.Path.StartsWithSegments("/iptv"), |
|
|
|
|
|
|
|
iptv => |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
iptv.UseRouting(); |
|
|
|
|
|
|
|
iptv.UseEndpoints(endpoints => endpoints.MapControllers()); |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static void CustomServices(IServiceCollection services) |
|
|
|
private static void CustomServices(IServiceCollection services) |
|
|
|
|