mirror of
https://github.com/239573049/FastGateway.git
synced 2026-10-17 05:20:30 +08:00
增加静态文件代理日志打印
This commit is contained in:
@@ -35,6 +35,7 @@ public class StaticFileProxyMiddleware(IContentTypeProvider contentTypeProvider)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// 设置响应头
|
||||
foreach (var header in staticFileProxyEntity.ResponseHeaders)
|
||||
{
|
||||
@@ -49,6 +50,8 @@ public class StaticFileProxyMiddleware(IContentTypeProvider contentTypeProvider)
|
||||
context.Request.Path = "/" + staticFileProxyEntity.Index;
|
||||
}
|
||||
|
||||
Console.WriteLine($"静态文件代理:{staticFileProxyEntity.Path} -> {staticFileProxyEntity.Root} Path > {context.Request.Path} ");
|
||||
|
||||
// 拼接静态文件的完整路径
|
||||
var fileInfo = new FileInfo(Path.Combine(staticFilePath,
|
||||
context.Request.Path.Value?.TrimStart('/') ?? string.Empty));
|
||||
|
||||
Reference in New Issue
Block a user