mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-02-12 16:12:44 +00:00
fixed remove legacy admin IP blocking config field
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
@@ -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": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,5 @@
|
|||||||
"log": {
|
"log": {
|
||||||
"path": "",
|
"path": "",
|
||||||
"errorPath": ""
|
"errorPath": ""
|
||||||
},
|
}
|
||||||
"ip_allow_list": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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(),
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user