Merge pull request #1135 from tgstation/1114-WeExistAndYouArentAllowed

403 instead of 404 on foreign bridge request
This commit is contained in:
Jordan Brown
2020-10-13 12:17:22 -04:00
committed by GitHub
@@ -65,8 +65,8 @@ namespace Tgstation.Server.Host.Controllers
var remoteIP = Request.HttpContext.Connection.RemoteIpAddress;
if (!IPAddress.IsLoopback(remoteIP))
{
logger.LogTrace("Ignoring remote bridge request from {0}", remoteIP);
return NotFound();
logger.LogTrace("Rejecting remote bridge request from {0}", remoteIP);
return Forbid();
}
using (LogContext.PushProperty("Bridge", Interlocked.Increment(ref requestsProcessed)))