mirror of
https://github.com/swissmakers/fail2ban-ui.git
synced 2026-04-19 06:53:14 +02:00
Implement version check on load, if the footer has data-update-check=true,it fetches /api/version and sets the version badge. No request is made when update check is disabled.
This commit is contained in:
@@ -58,6 +58,9 @@ func RegisterRoutes(r *gin.Engine, hub *Hub) {
|
||||
api.POST("/jails", CreateJailHandler)
|
||||
api.DELETE("/jails/:jail", DeleteJailHandler)
|
||||
|
||||
// Version and update check (only on page load; UPDATE_CHECK=false disables GitHub request)
|
||||
api.GET("/version", GetVersionHandler)
|
||||
|
||||
// Settings endpoints
|
||||
api.GET("/settings", GetSettingsHandler)
|
||||
api.POST("/settings", UpdateSettingsHandler)
|
||||
|
||||
Reference in New Issue
Block a user