From 2d0ea5ba085f9caa84a7e7b1fd55f653834009aa Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 5 Apr 2025 20:37:03 +0800 Subject: sshPubkey* shall no longer be global variables --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index 8eca6a7..2e1e094 100644 --- a/main.go +++ b/main.go @@ -36,6 +36,12 @@ func main() { panic(err) } s.staticHandler = http.StripPrefix("/-/static/", http.FileServer(http.FS(staticFS))) + s.globalData = map[string]any{ + "server_public_key_string": &s.serverPubkeyString, + "server_public_key_fingerprint": &s.serverPubkeyFP, + "forge_version": VERSION, + // Some other ones are populated after config parsing + } if err := s.loadConfig(*configPath); err != nil { slog.Error("loading configuration", "error", err) -- cgit v1.2.3