mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 03:48:06 +02:00
Don't send Exception message in Production Environment
This commit is contained in:
parent
777c9c7bc9
commit
e9ebe07ecc
1 changed files with 6 additions and 0 deletions
|
@ -230,6 +230,12 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
|
|
||||||
httpRes.StatusCode = statusCode;
|
httpRes.StatusCode = statusCode;
|
||||||
|
|
||||||
|
if (!_hostEnvironment.IsDevelopment())
|
||||||
|
{
|
||||||
|
await httpRes.WriteAsync("Error processing request.").ConfigureAwait(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var errContent = NormalizeExceptionMessage(ex) ?? string.Empty;
|
var errContent = NormalizeExceptionMessage(ex) ?? string.Empty;
|
||||||
httpRes.ContentType = "text/plain";
|
httpRes.ContentType = "text/plain";
|
||||||
httpRes.ContentLength = errContent.Length;
|
httpRes.ContentLength = errContent.Length;
|
||||||
|
|
Loading…
Reference in a new issue