fix hdhr endpoint classification (#2101)
This commit is contained in:
@@ -73,6 +73,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Fix display of SVG channel logo and watermark in admin UI
|
||||
- Existing SVG logos and watermarks will have to be re-uploaded to display properly in the admin UI
|
||||
- This does not affect streaming at all; existing artwork still works fine for streaming
|
||||
- Classify HDHR endpoints as streaming endpoints
|
||||
- This allows these endpoints to be accessed through port `ETV_STREAMING_PORT` (default `8409`)
|
||||
- This only matters if you configured `ETV_UI_PORT` to be a different value, which makes UI endpoints inaccessible on the streaming port
|
||||
|
||||
## [25.2.0] - 2025-06-24
|
||||
### Added
|
||||
|
||||
+10
-3
@@ -562,7 +562,7 @@ public class Startup
|
||||
async (context, next) =>
|
||||
{
|
||||
if (!context.Request.Host.Value.StartsWith("localhost", StringComparison.OrdinalIgnoreCase) &&
|
||||
!context.Request.Path.StartsWithSegments("/iptv") &&
|
||||
!IsIptvPath(context.Request.Path) &&
|
||||
context.Connection.LocalPort != Settings.UiPort)
|
||||
{
|
||||
context.Response.StatusCode = 404;
|
||||
@@ -573,7 +573,7 @@ public class Startup
|
||||
});
|
||||
|
||||
app.MapWhen(
|
||||
ctx => !ctx.Request.Path.StartsWithSegments("/iptv"),
|
||||
ctx => !IsIptvPath(ctx.Request.Path),
|
||||
blazor =>
|
||||
{
|
||||
blazor.UseRouting();
|
||||
@@ -596,12 +596,19 @@ public class Startup
|
||||
});
|
||||
|
||||
app.MapWhen(
|
||||
ctx => ctx.Request.Path.StartsWithSegments("/iptv"),
|
||||
ctx => IsIptvPath(ctx.Request.Path),
|
||||
iptv =>
|
||||
{
|
||||
iptv.UseRouting();
|
||||
iptv.UseEndpoints(endpoints => endpoints.MapControllers());
|
||||
});
|
||||
return;
|
||||
|
||||
bool IsIptvPath(PathString path) => path.StartsWithSegments("/iptv") ||
|
||||
path.StartsWithSegments("/discover.json") ||
|
||||
path.StartsWithSegments("/device.xml") ||
|
||||
path.StartsWithSegments("/lineup.json") ||
|
||||
path.StartsWithSegments("/lineup_status.json");
|
||||
}
|
||||
|
||||
private static void CustomServices(IServiceCollection services)
|
||||
|
||||
Reference in New Issue
Block a user