优化结构

This commit is contained in:
Yvan
2026-08-27 22:33:43 +08:00
parent 5052835fcb
commit e407d3ac10
86 changed files with 3151 additions and 726 deletions
@@ -0,0 +1,12 @@
package middleware
import (
"strings"
"testing"
)
func TestDefaultCORSHeadersDoNotAllowUserIdentityHeader(t *testing.T) {
if strings.Contains(strings.ToLower(defaultCORSHeaders), "x-user-id") {
t.Fatal("default CORS headers still allow the forgeable x-user-id header")
}
}