Skip to content

Commit

Permalink
Merge pull request #95 from fqutishat/update
Browse files Browse the repository at this point in the history
chore: pass webfinger endpoint from token check
  • Loading branch information
fqutishat authored Apr 6, 2022
2 parents f578b6b + b0d9785 commit 222452d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/vct/startcmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ const (
defaultSyncTimeout = "3"
healthCheckEndpoint = "/healthcheck"
addVCEndpoint = "/add-vc"
webFingerEndpoint = "/.well-known/webfinger"
)

type (
Expand Down Expand Up @@ -1116,7 +1117,7 @@ func createJSONLDDocumentLoader(ldStore *ldStoreProvider, httpClient *http.Clien
}

func validateAuthorizationBearerToken(w http.ResponseWriter, r *http.Request, readToken, writeToken string) bool {
if r.RequestURI == healthCheckEndpoint {
if r.RequestURI == healthCheckEndpoint || strings.Contains(r.RequestURI, webFingerEndpoint) {
return true
}

Expand Down

0 comments on commit 222452d

Please sign in to comment.