Browse Source

update iptv routing (#1631)

pull/1632/head
Jason Dove 2 years ago committed by GitHub
parent
commit
99cd01f73b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 37
      ErsatzTV/Startup.cs

1
CHANGELOG.md

@ -53,6 +53,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Search index updates should now complete at the same time as library scans - Search index updates should now complete at the same time as library scans
- Do not unnecessarily update the search index during media server library scans - Do not unnecessarily update the search index during media server library scans
- Use different library for reading song metadata that supports multiple tag entries - Use different library for reading song metadata that supports multiple tag entries
- Update `/iptv` routing to make UI completely inaccessible from that path prefix
## [0.8.5-beta] - 2024-01-30 ## [0.8.5-beta] - 2024-01-30
### Added ### Added

37
ErsatzTV/Startup.cs

@ -531,20 +531,35 @@ 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
}
blazor.UseEndpoints(
endpoints =>
{
endpoints.MapControllers();
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_Host");
});
});
app.UseEndpoints( app.MapWhen(
endpoints => ctx => ctx.Request.Path.StartsWithSegments("/iptv"),
iptv =>
{ {
endpoints.MapControllers(); iptv.UseRouting();
endpoints.MapBlazorHub(); iptv.UseEndpoints(endpoints => endpoints.MapControllers());
endpoints.MapFallbackToPage("/_Host");
}); });
} }

Loading…
Cancel
Save