|
@@ -4,6 +4,7 @@ using Microsoft.Extensions.FileProviders;
|
|
using Microsoft.Extensions.Primitives;
|
|
using Microsoft.Extensions.Primitives;
|
|
using System;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
|
|
+using System.IO;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
@@ -30,6 +31,13 @@ namespace LJProxy.Providers
|
|
public IFileInfo GetFileInfo(string subpath)
|
|
public IFileInfo GetFileInfo(string subpath)
|
|
{
|
|
{
|
|
string physicSubpath = subpath.Replace("/","\\");
|
|
string physicSubpath = subpath.Replace("/","\\");
|
|
|
|
+ int suffixIndex = physicSubpath.IndexOf(DocumentSuffix);
|
|
|
|
+ if (suffixIndex > 0)
|
|
|
|
+ {
|
|
|
|
+ string fileExtension = Path.GetExtension(physicSubpath);
|
|
|
|
+ physicSubpath = physicSubpath.Substring(0, suffixIndex);
|
|
|
|
+ physicSubpath = physicSubpath + fileExtension;
|
|
|
|
+ }
|
|
string directory = @$"{_contentRoot}\wwwroot";
|
|
string directory = @$"{_contentRoot}\wwwroot";
|
|
var fullFilepath = @$"{directory}{physicSubpath}";
|
|
var fullFilepath = @$"{directory}{physicSubpath}";
|
|
_token = _accessor.HttpContext.Request.Headers["Authorization"];
|
|
_token = _accessor.HttpContext.Request.Headers["Authorization"];
|
|
@@ -37,6 +45,9 @@ namespace LJProxy.Providers
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private readonly static string DocumentSuffix = "$27BAljSuffix!";
|
|
|
|
+
|
|
|
|
+
|
|
public IChangeToken Watch(string filter)
|
|
public IChangeToken Watch(string filter)
|
|
{
|
|
{
|
|
throw new NotImplementedException();
|
|
throw new NotImplementedException();
|