From 576d27b4607175fbf15feb2ab85db0dcbfeac46a Mon Sep 17 00:00:00 2001 From: "Valeriano A.R" Date: Sun, 11 Nov 2018 14:54:48 +0100 Subject: [PATCH] GlobalRouter: Use PhysicalPath on allowed media. --- VAR.Focus.Web/GlobalRouter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VAR.Focus.Web/GlobalRouter.cs b/VAR.Focus.Web/GlobalRouter.cs index f5b3051..18bcf79 100644 --- a/VAR.Focus.Web/GlobalRouter.cs +++ b/VAR.Focus.Web/GlobalRouter.cs @@ -119,7 +119,7 @@ namespace VAR.Focus.Web string extension = Path.GetExtension(context.Request.FilePath).ToLower(); if (Globals.AllowedExtensions.Contains(extension)) { - string filePath = context.Server.MapPath(string.Format("~/{0}", context.Request.FilePath)); + string filePath = context.Request.PhysicalPath; if (File.Exists(filePath)) { StaticFileHelper.ResponseStaticFile(context, filePath);