favicon
This commit is contained in:
@@ -16,6 +16,8 @@ namespace aka.terribledev.io
|
|||||||
public static byte[] hello = System.Text.Encoding.UTF8.GetBytes("hello");
|
public static byte[] hello = System.Text.Encoding.UTF8.GetBytes("hello");
|
||||||
public static byte[] fourOhFor = System.Text.Encoding.UTF8.GetBytes("404");
|
public static byte[] fourOhFor = System.Text.Encoding.UTF8.GetBytes("404");
|
||||||
public static int helloCount = hello.Count();
|
public static int helloCount = hello.Count();
|
||||||
|
public static byte[] favicon = System.IO.File.ReadAllBytes("favicon.ico");
|
||||||
|
public static int faviconByteCount = favicon.Count();
|
||||||
public Startup(IHostingEnvironment env)
|
public Startup(IHostingEnvironment env)
|
||||||
{
|
{
|
||||||
var builder = new ConfigurationBuilder()
|
var builder = new ConfigurationBuilder()
|
||||||
@@ -58,6 +60,11 @@ namespace aka.terribledev.io
|
|||||||
|
|
||||||
});
|
});
|
||||||
app.UseRouter(a=>{
|
app.UseRouter(a=>{
|
||||||
|
a.MapGet("favicon.ico", b=>
|
||||||
|
{
|
||||||
|
b.Response.StatusCode = 200;
|
||||||
|
return b.Response.Body.WriteAsync(favicon, 0, faviconByteCount);
|
||||||
|
});
|
||||||
foreach(var route in Routes.RoutesDictionary)
|
foreach(var route in Routes.RoutesDictionary)
|
||||||
{
|
{
|
||||||
a.MapGet(route.Key, handler: async b=>{
|
a.MapGet(route.Key, handler: async b=>{
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
<AssemblyName>aka.terribledev.io</AssemblyName>
|
<AssemblyName>aka.terribledev.io</AssemblyName>
|
||||||
<PackageId>aka.terribledev.io</PackageId>
|
<PackageId>aka.terribledev.io</PackageId>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="favicon.ico" CopyToPublishDirectory="PreserveNewest" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
|
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
|
||||||
|
|||||||
BIN
favicon.ico
Normal file
BIN
favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user