16 lines
262 B
Go
16 lines
262 B
Go
|
package jwt
|
||
|
|
||
|
import (
|
||
|
"mini_server/internal/config"
|
||
|
"net/url"
|
||
|
)
|
||
|
|
||
|
func withinWhiteList(url *url.URL, method string) bool {
|
||
|
target := config.JwtApiAuthWhiteList
|
||
|
path := url.Path
|
||
|
if v, ok := target[path]; ok && (method == v) {
|
||
|
return true
|
||
|
}
|
||
|
return false
|
||
|
}
|