Been too long since i did anything, can't remember what the hell is in all this....

This commit is contained in:
2025-04-15 20:56:21 +01:00
parent 152c5cb18c
commit d7c15141b8
20 changed files with 248 additions and 78 deletions

View File

@@ -13,7 +13,6 @@ func Recover(next http.Handler) http.Handler {
if rec := recover(); rec != nil {
log.Printf("🔥 Recovered from panic: %v\n%s", rec, debug.Stack())
// ✅ Call your custom template-based fallback
helpers.RenderError(w, r, http.StatusInternalServerError)
}
}()

View File

@@ -2,7 +2,6 @@ package middleware
import "net/http"
// Redirects all HTTP to HTTPS (only in production)
func EnforceHTTPS(next http.Handler, enabled bool) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if enabled && r.Header.Get("X-Forwarded-Proto") != "https" && r.TLS == nil {