Been too long since i did anything, can't remember what the hell is in all this....
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user