fixed remove legacy admin IP blocking config field

Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
Ronni Skansing
2025-11-04 16:40:54 +01:00
parent 101126e54d
commit a7a5f7aacc
5 changed files with 9 additions and 17 deletions

View File

@@ -16,6 +16,5 @@
"database": { "database": {
"engine": "sqlite3", "engine": "sqlite3",
"dsn": "file:/app/.dev/db.sqlite3" "dsn": "file:/app/.dev/db.sqlite3"
}, }
"ip_allow_list": []
} }

View File

@@ -20,6 +20,5 @@
"log": { "log": {
"path": "", "path": "",
"errorPath": "" "errorPath": ""
}, }
"ip_allow_list": []
} }

View File

@@ -98,12 +98,11 @@ type (
// AdministrationServer ConfigDTO administration // AdministrationServer ConfigDTO administration
AdministrationServer struct { AdministrationServer struct {
TLSHost string `json:"tls_host"` TLSHost string `json:"tls_host"`
TLSAuto bool `json:"tls_auto"` TLSAuto bool `json:"tls_auto"`
TLSCertPath string `json:"tls_cert_path"` TLSCertPath string `json:"tls_cert_path"`
TLSKeyPath string `json:"tls_key_path"` TLSKeyPath string `json:"tls_key_path"`
Address string `json:"address"` Address string `json:"address"`
AllowList []string `json:"ip_allow_list"`
} }
// PhishingServer ConfigDTO phishing // PhishingServer ConfigDTO phishing
@@ -471,8 +470,6 @@ func FromDTO(dto *ConfigDTO) (*Config, error) {
// ToDTO converts a *Config to a *ConfigDTO // ToDTO converts a *Config to a *ConfigDTO
func (c *Config) ToDTO() *ConfigDTO { func (c *Config) ToDTO() *ConfigDTO {
allowList := make([]string, 0)
return &ConfigDTO{ return &ConfigDTO{
ACME: ACME{ ACME: ACME{
Email: c.acme.Email, Email: c.acme.Email,
@@ -483,7 +480,6 @@ func (c *Config) ToDTO() *ConfigDTO {
TLSCertPath: c.TLSCertPath(), TLSCertPath: c.TLSCertPath(),
TLSKeyPath: c.TLSKeyPath(), TLSKeyPath: c.TLSKeyPath(),
Address: c.AdminNetAddress(), Address: c.AdminNetAddress(),
AllowList: allowList,
}, },
PhishingServer: PhishingServer{ PhishingServer: PhishingServer{
Http: c.phishingHTTPNetAddress.String(), Http: c.phishingHTTPNetAddress.String(),

View File

@@ -7,8 +7,7 @@
"tls_auto": false, "tls_auto": false,
"tls_cert_path": "/app/data/certs/admin/public.pem", "tls_cert_path": "/app/data/certs/admin/public.pem",
"tls_key_path": "/app/data/certs/admin/private.pem", "tls_key_path": "/app/data/certs/admin/private.pem",
"address": "0.0.0.0:8000", "address": "0.0.0.0:8000"
"ip_allow_list": []
}, },
"phishing": { "phishing": {
"http": "0.0.0.0:8080", "http": "0.0.0.0:8080",

View File

@@ -15,8 +15,7 @@ if [ ! -f /app/config/config.json ]; then
"tls_auto": false, "tls_auto": false,
"tls_cert_path": "/app/config/certs/admin/public.pem", "tls_cert_path": "/app/config/certs/admin/public.pem",
"tls_key_path": "/app/config/certs/admin/private.pem", "tls_key_path": "/app/config/certs/admin/private.pem",
"address": "0.0.0.0:8000", "address": "0.0.0.0:8000"
"ip_allow_list": []
}, },
"phishing": { "phishing": {
"http": "0.0.0.0:8080", "http": "0.0.0.0:8080",