Skip to content

Commit

Permalink
Further changes on the previous commit (updated source code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiMaz committed Jun 21, 2017
1 parent 92b4bc3 commit 8d593ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Libraries/Nop.Core/WebHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,10 @@ public virtual bool IsStaticResource()
string path = _httpContextAccessor.HttpContext.Request.Path;

//a little workaround. FileExtensionContentTypeProvider contains most of static file extensions. So we can use it
//source: https://github.com/aspnet/StaticFiles/blob/dev/src/Microsoft.AspNetCore.StaticFiles/FileExtensionContentTypeProvider.cs
//if it can return content type, then it's a static file
var contentTypeProvider = new FileExtensionContentTypeProvider();
return contentTypeProvider.TryGetContentType(path, out string contentType));
return contentTypeProvider.TryGetContentType(path, out string contentType);
}

/// <summary>
Expand Down

0 comments on commit 8d593ed

Please sign in to comment.