mirror of
https://github.com/ipfs/kubo.git
synced 2025-08-26 04:26:07 +08:00
feat: path consolidation (#10063)
This commit is contained in:
@ -9,7 +9,6 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
path "github.com/ipfs/boxo/path"
|
||||
cmds "github.com/ipfs/go-ipfs-cmds"
|
||||
cmdsHttp "github.com/ipfs/go-ipfs-cmds/http"
|
||||
version "github.com/ipfs/kubo"
|
||||
@ -171,7 +170,7 @@ func CheckVersionOption() ServeOption {
|
||||
parent.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
if strings.HasPrefix(r.URL.Path, APIPath) {
|
||||
cmdqry := r.URL.Path[len(APIPath):]
|
||||
pth := path.SplitList(cmdqry)
|
||||
pth := strings.Split(cmdqry, "/")
|
||||
|
||||
// backwards compatibility to previous version check
|
||||
if len(pth) >= 2 && pth[1] != "version" {
|
||||
|
Reference in New Issue
Block a user