Files
archivmail/internal/api/system_info_handler.go
T
sysops 2a91f6e249 fix: IMAP-Serveradresse dynamisch aus Backend laden
Hardcodierte 192.168.1.131 in settings/page.tsx ersetzt durch
dynamischen API-Call GET /api/system/info → {fqdn, imap_port}.
Fallback auf window.location.hostname wenn API nicht antwortet.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 11:06:58 +02:00

19 lines
618 B
Go

package api
import "net/http"
// handleSystemInfo liefert öffentliche System-Verbindungsdaten
// (FQDN, IMAP-Port). Wird im Frontend für die IMAP-Zugang-Karte
// auf der Settings-Seite verwendet.
//
// GET /api/system/info — auth required (Endpoint zeigt nur generische,
// nicht-sensitive Verbindungsdaten an, ist aber an Login gebunden, um
// öffentliches Profiling der Installation zu vermeiden).
func (s *Server) handleSystemInfo(w http.ResponseWriter, r *http.Request) {
writeJSON(w, http.StatusOK, map[string]interface{}{
"fqdn": s.fqdn,
"imap_port": 9993,
"imap_port_alt": 993,
})
}