Add dedicated m3u page for nginx rewrite rules
This commit is contained in:
parent
4e21eac397
commit
84746b226b
|
@ -27,7 +27,7 @@ else
|
|||
<a class="action-muted">[..]</a>
|
||||
<a href="?@Model.path_oneup" class="entry-muted cfont"> Go back</a><br/>
|
||||
<a class="action-muted">[--]</a>
|
||||
<a href="/@(Request.QueryString).m3u" class="entry-muted cfont"> Download m3u</a><br/><br/>
|
||||
<a href="/m3u@(Request.QueryString).m3u" class="entry-muted cfont"> Download m3u</a><br/><br/>
|
||||
@foreach (var dir in Model.dirs)
|
||||
{
|
||||
<a class="action" href="#">[--]</a>
|
||||
|
|
16
Pages/m3u.cshtml
Normal file
16
Pages/m3u.cshtml
Normal file
|
@ -0,0 +1,16 @@
|
|||
@page
|
||||
@using System.Web
|
||||
@model IndexModel
|
||||
@{
|
||||
var path = HttpUtility.UrlDecode(Request.QueryString.Value.TrimStart('?'));
|
||||
Layout = null;
|
||||
Response.ContentType = "text/plain";
|
||||
}
|
||||
@if (Model.path.Contains(".."))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@foreach (var file in Model.files)
|
||||
{
|
||||
@Html.Raw("https://" + Request.Host + "/" + Model.fullpath + "/" + file.Replace("?", "%3F") +"\n")
|
||||
}
|
Loading…
Reference in a new issue