优化结构
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user