feat: add oauth token validity verification
This commit is contained in:
@@ -10,6 +10,7 @@ You may get a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
import (
|
||||
"net/url"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -96,3 +97,11 @@ func ParseRoutePath(path, blockedPath string) string {
|
||||
return basePath + blockedPath
|
||||
}
|
||||
}
|
||||
|
||||
func UrlParsePath(uri string) string {
|
||||
parse, err := url.Parse(uri)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return parse.Path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user