fix: cleanup webfinger URI parsing
This commit is contained in:
parent
f7ca56557c
commit
fc3c944c16
1 changed files with 1 additions and 2 deletions
|
@ -70,8 +70,7 @@ func WebfingerQuery(ctx *context.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
p, _ := strings.CutPrefix(resource.Path, "/")
|
p := strings.Trim(resource.Path, "/")
|
||||||
p, _ = strings.CutSuffix(p, "/")
|
|
||||||
if len(p) == 0 {
|
if len(p) == 0 {
|
||||||
ctx.Error(http.StatusNotFound)
|
ctx.Error(http.StatusNotFound)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue