Problem: need url for login
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Solution: create url when input does not parse
This commit is contained in:
parent
b33cfeb395
commit
f617dd973f
8
main.go
8
main.go
|
@ -293,8 +293,12 @@ func (*authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
u, err := url.Parse(urlString)
|
u, err := url.Parse(urlString)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, err.Error(), 400)
|
urlString = fmt.Sprintf("https://%s/", urlString)
|
||||||
return
|
u, err = url.Parse(urlString)
|
||||||
|
if err != nil {
|
||||||
|
http.Error(w, err.Error(), 400)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
endpoints, err := indieauth.GetEndpoints(u)
|
endpoints, err := indieauth.GetEndpoints(u)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user