Changed IsDocker check (#1998)
* Refactored IsDocker to be completely static and changed to use an environment variable instead. * Removed file from another branch
This commit is contained in:
parent
57a6c769bc
commit
be5b5d9251
10 changed files with 20 additions and 77 deletions
|
@ -15,6 +15,7 @@ using API.Services.Tasks.Scanner;
|
|||
using AutoMapper;
|
||||
using Flurl.Http;
|
||||
using Kavita.Common;
|
||||
using Kavita.Common.EnvironmentInfo;
|
||||
using Kavita.Common.Extensions;
|
||||
using Kavita.Common.Helpers;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
@ -183,6 +184,7 @@ public class SettingsController : BaseApiController
|
|||
|
||||
if (setting.Key == ServerSettingKey.Port && updateSettingsDto.Port + string.Empty != setting.Value)
|
||||
{
|
||||
if (OsInfo.IsDocker) break;
|
||||
setting.Value = updateSettingsDto.Port + string.Empty;
|
||||
// Port is managed in appSetting.json
|
||||
Configuration.Port = updateSettingsDto.Port;
|
||||
|
@ -191,6 +193,7 @@ public class SettingsController : BaseApiController
|
|||
|
||||
if (setting.Key == ServerSettingKey.IpAddresses && updateSettingsDto.IpAddresses != setting.Value)
|
||||
{
|
||||
if (OsInfo.IsDocker) break;
|
||||
// Validate IP addresses
|
||||
foreach (var ipAddress in updateSettingsDto.IpAddresses.Split(','))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue