mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
Merge branch 'master' into mediaencoding
This commit is contained in:
@@ -172,16 +172,18 @@ namespace MediaBrowser.Model.Configuration
|
||||
if (string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
// If baseUrl is empty, set an empty prefix string
|
||||
value = string.Empty;
|
||||
_baseUrl = string.Empty;
|
||||
return;
|
||||
}
|
||||
else if (!value.StartsWith("/"))
|
||||
|
||||
if (value[0] != '/')
|
||||
{
|
||||
// If baseUrl was not configured with a leading slash, append one for consistency
|
||||
value = "/" + value;
|
||||
}
|
||||
|
||||
// Normalize the end of the string
|
||||
if (value.EndsWith("/"))
|
||||
if (value[value.Length - 1] == '/')
|
||||
{
|
||||
// If baseUrl was configured with a trailing slash, remove it for consistency
|
||||
value = value.Remove(value.Length - 1);
|
||||
|
||||
Reference in New Issue
Block a user