From edad80f298e89b6e9fbc361012cd114c90cccdfe Mon Sep 17 00:00:00 2001 From: jocloud Date: Mon, 25 May 2020 02:56:18 +0000 Subject: [PATCH] =?utf8?q?=ED=8E=98=EC=9D=B4=EC=8A=A4=EB=B6=81=20=ED=94=BD?= =?utf8?q?=EC=85=80=20=EA=B8=B0=EB=B3=B8pageview=20=EC=BD=94=EB=93=9C=20?= =?utf8?q?=EC=B6=94=EA=B0=80,=20=ED=8C=8C=EB=B9=84=EC=BD=98=20=EC=84=A4?= =?utf8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ZipProject/Controllers/WebZipController.cs | 16 ++++++++++++++++ ZipProject/Views/Shared/_Layout.cshtml | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/ZipProject/Controllers/WebZipController.cs b/ZipProject/Controllers/WebZipController.cs index 9b2ff8e..9ba1a8b 100644 --- a/ZipProject/Controllers/WebZipController.cs +++ b/ZipProject/Controllers/WebZipController.cs @@ -171,6 +171,22 @@ namespace ZipProject.Controllers return File(file, content_type, "robots.txt"); } + [HttpGet("/favicon.ico")] + public IActionResult Favicon() + { + string path; + string content_type= "Multipart/related"; + +#if !DEBUG + path = Environment.CurrentDirectory + "/release/netcoreapp2.1/publish/wwwroot/favicon.ico"; +#else + path = Environment.CurrentDirectory + "/wwwroot/robots.txt"; +#endif + + byte[] file = System.IO.File.ReadAllBytes(path); + return File(file, content_type, "favicon.ico"); + } + } } \ No newline at end of file diff --git a/ZipProject/Views/Shared/_Layout.cshtml b/ZipProject/Views/Shared/_Layout.cshtml index 6dfaf91..7bd7756 100644 --- a/ZipProject/Views/Shared/_Layout.cshtml +++ b/ZipProject/Views/Shared/_Layout.cshtml @@ -40,6 +40,23 @@ + + + +