Skip to content

Commit

Permalink
Remove old commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
jhiemstrawisc committed Sep 1, 2023
1 parent 45a37a6 commit 07bc75d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions director.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ func CreateNsFromDirectorResp(dirResp *http.Response, namespace *namespaces.Name
func QueryDirector(source string, directorUrl string) (resp *http.Response, err error) {
resourceUrl := directorUrl + source


// Here we use http.Transport to prevent the client from following the director's
// redirect. We use the Location url elsewhere (plus we still need to do the token
// dance!)
var client *http.Client
if viper.GetBool("TLSSkipVerify") {
tr := &http.Transport{
Expand All @@ -140,14 +142,6 @@ func QueryDirector(source string, directorUrl string) (resp *http.Response, err
}
}

// // Prevent following the Director's redirect
// client := &http.Client{
// CheckRedirect: func(req *http.Request, via []*http.Request) error {
// return http.ErrUseLastResponse
// },

// }

log.Debugln("Querying OSDF Director at", resourceUrl)
resp, err = client.Get(resourceUrl)
log.Debugln("Director's response:", resp)
Expand Down

0 comments on commit 07bc75d

Please sign in to comment.