This commit is contained in:
2025-11-08 15:59:45 +06:00
parent 4779c4bca4
commit eb9a7dcf32
20 changed files with 1339 additions and 99 deletions

View File

@@ -232,11 +232,11 @@ func registerRoutesExceptHome() {
http.HandleFunc(makePath("/api/add-to-history"), AuthMiddleware(CSRFMiddleware(handleAddToHistory)))
// Catch-all 404 для любых незарегистрированных путей (только когда BasePath задан)
if getBasePath() != "" {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
renderNotFound(w, "Страница не найдена", getBasePath())
})
}
// if getBasePath() != "" {
// http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
// renderNotFound(w, "Страница не найдена", getBasePath())
// })
// }
}
// registerRoutes регистрирует все маршруты сервера