fix installer script
Some checks failed
CI / test-build (push) Has been cancelled

This commit is contained in:
2025-12-15 16:47:48 +07:00
parent b4ef76f0d0
commit 1c53988cbd
8 changed files with 22 additions and 15 deletions

View File

@@ -11,7 +11,7 @@ import (
func (a *App) httpsEnforcementMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// Skip HTTPS enforcement for health checks and localhost
if a.isPublicEndpoint(r.URL.Path) || isLocalhost(r) {
if a.isPublicEndpoint(r.URL.Path, r.Method) || isLocalhost(r) {
next.ServeHTTP(w, r)
return
}
@@ -53,7 +53,7 @@ func isLocalhost(r *http.Request) bool {
func (a *App) requireHTTPSMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// Skip for health checks
if a.isPublicEndpoint(r.URL.Path) {
if a.isPublicEndpoint(r.URL.Path, r.Method) {
next.ServeHTTP(w, r)
return
}