mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-02 19:49:07 +02:00
Extend bypass middleware with support of wildcard paths (#1628)
--------- Co-authored-by: Viktor Liu <viktor@netbird.io>
This commit is contained in:
co-authored by
Viktor Liu
parent
e1c50248d9
commit
d8ce08d898
@@ -177,7 +177,10 @@ func TestAuthMiddleware_Handler(t *testing.T) {
|
||||
for _, tc := range tt {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
if tc.shouldBypassAuth {
|
||||
bypass.AddBypassPath(tc.path)
|
||||
err := bypass.AddBypassPath(tc.path)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to add bypass path: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
req := httptest.NewRequest("GET", "http://testing"+tc.path, nil)
|
||||
|
||||
Reference in New Issue
Block a user