feat: separate Public IP for DNS records from Server IP, improve settings help texts
- Add public_ip field to Settings for DNS A records (proxy/load balancer IP) - DNS records now use public_ip, falling back to server_ip if empty - Server IP renamed to "Server IP (Docker Host)" for clarity - Public IP labeled "Public IP (DNS Target)" - Updated help texts for domain, server IP, public IP, and Docker network - DB migration + schema for public_ip column
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
type settingsRequest struct {
|
||||
Domain string `json:"domain"`
|
||||
ServerIP string `json:"server_ip"`
|
||||
PublicIP string `json:"public_ip"`
|
||||
Network string `json:"network"`
|
||||
SubdomainPattern string `json:"subdomain_pattern"`
|
||||
NotificationURL string `json:"notification_url"`
|
||||
@@ -59,6 +60,7 @@ func (s *Server) getSettings(w http.ResponseWriter, r *http.Request) {
|
||||
respondJSON(w, http.StatusOK, map[string]any{
|
||||
"domain": settings.Domain,
|
||||
"server_ip": settings.ServerIP,
|
||||
"public_ip": settings.PublicIP,
|
||||
"network": settings.Network,
|
||||
"subdomain_pattern": settings.SubdomainPattern,
|
||||
"notification_url": settings.NotificationURL,
|
||||
@@ -107,6 +109,9 @@ func (s *Server) updateSettings(w http.ResponseWriter, r *http.Request) {
|
||||
if req.ServerIP != "" {
|
||||
updated.ServerIP = req.ServerIP
|
||||
}
|
||||
if req.PublicIP != "" {
|
||||
updated.PublicIP = req.PublicIP
|
||||
}
|
||||
if req.Network != "" {
|
||||
updated.Network = req.Network
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user