mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
Don't send Exception message in Production Environment
This commit is contained in:
@@ -230,6 +230,12 @@ namespace Emby.Server.Implementations.HttpServer
|
||||
|
||||
httpRes.StatusCode = statusCode;
|
||||
|
||||
if (!_hostEnvironment.IsDevelopment())
|
||||
{
|
||||
await httpRes.WriteAsync("Error processing request.").ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
var errContent = NormalizeExceptionMessage(ex) ?? string.Empty;
|
||||
httpRes.ContentType = "text/plain";
|
||||
httpRes.ContentLength = errContent.Length;
|
||||
|
||||
Reference in New Issue
Block a user