mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-21 23:22:34 +01:00
feat(api): add configurable landing page at /
Allow server operators to show new players how to install the game client when they visit the server address in a browser. The page content (title and HTML body) is fully configurable via config.json and can be toggled on/off. Uses Go embed for a self-contained dark- themed HTML template with zero new dependencies.
This commit is contained in:
@@ -63,6 +63,7 @@ func (s *APIServer) Start() error {
|
||||
r.HandleFunc("/character/export", s.ExportSave)
|
||||
r.HandleFunc("/api/ss/bbs/upload.php", s.ScreenShot)
|
||||
r.HandleFunc("/api/ss/bbs/{id}", s.ScreenShotGet)
|
||||
r.HandleFunc("/", s.LandingPage)
|
||||
r.HandleFunc("/health", s.Health)
|
||||
r.HandleFunc("/version", s.Version)
|
||||
handler := handlers.CORS(handlers.AllowedHeaders([]string{"Content-Type"}))(r)
|
||||
|
||||
Reference in New Issue
Block a user