Skip to content

Commit

Permalink
Update Index.cshtml.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
leastprivilege authored May 7, 2024
1 parent ef274c0 commit d92a51a
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/Pages/Diagnostics/Index.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ public class Index : PageModel

public async Task<IActionResult> OnGet()
{
var localAddresses = new List<string?> { "127.0.0.1", "::1" };
if(HttpContext.Connection.LocalIpAddress != null)
{
localAddresses.Add(HttpContext.Connection.LocalIpAddress.ToString());
}

if (!localAddresses.Contains(HttpContext.Connection.RemoteIpAddress?.ToString()))
{
return NotFound();
}

View = new ViewModel(await HttpContext.AuthenticateAsync());

return Page();
Expand Down

0 comments on commit d92a51a

Please sign in to comment.