Skip to content

Commit

Permalink
feat(backup_process_utils/BackupProcessHttpGetWithToken): Allow empty…
Browse files Browse the repository at this point in the history
… token (if empty, dont send the token header)
  • Loading branch information
ondrejsika committed Apr 12, 2023
1 parent 92c48b4 commit 07e55c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backup_process_utils/backup_process_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ func httpGetWithToken(
if err != nil {
return nil, err
}
req.Header.Set(tokenHeaderName, tokenHeaderValue)
if tokenHeaderName != "" && tokenHeaderValue != "" {
req.Header.Set(tokenHeaderName, tokenHeaderValue)
}

client := http.Client{}
resp, err := client.Do(req)
Expand Down

0 comments on commit 07e55c0

Please sign in to comment.