Skip to content

Commit f582beb

Browse files
author
Boris Ahrens
committed
Add home controller with redirection
1 parent 594ebb3 commit f582beb

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Microsoft.AspNetCore.Authorization;
2+
3+
namespace MalwareSampleExchange.Console.Controllers;
4+
using Microsoft.AspNetCore.Mvc;
5+
6+
[ApiController]
7+
[Route("")]
8+
[ApiExplorerSettings(IgnoreApi = true)]
9+
public class HomeController : ControllerBase
10+
{
11+
[AllowAnonymous]
12+
[HttpGet]
13+
public IActionResult Get()
14+
{
15+
return Redirect("~/swagger/index.html");
16+
}
17+
}

src/MalwareSampleExchange.Console/MalwareSampleExchange.Console.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,4 @@
4141
<ItemGroup>
4242
<Folder Include="Properties\" />
4343
</ItemGroup>
44-
<ItemGroup>
45-
<_ContentIncludedByDefault Remove="wwwroot\index.html" />
46-
<_ContentIncludedByDefault Remove="wwwroot\web.config" />
47-
</ItemGroup>
4844
</Project>

0 commit comments

Comments
 (0)