Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func RootCmd(version string) *cobra.Command {
cmd.PersistentFlags().BoolVarP(&imsConfig.ProxyIgnoreTLS, "proxyIgnoreTLS", "T", false,
"Ignore TLS certificate verification (only valid when connecting through a proxy).")
cmd.PersistentFlags().StringVarP(&configFile, "configFile", "f", "", "Configuration file.")
cmd.PersistentFlags().IntVar(&imsConfig.Timeout, "timeout", 30, "HTTP client timeout in seconds.")

cmd.AddCommand(
authzCmd(imsConfig),
Expand Down
4 changes: 2 additions & 2 deletions ims/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ func (i Config) httpClient() (*http.Client, error) {
t.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
}
client := &http.Client{
Timeout: 30 * time.Second,
Timeout: time.Duration(i.Timeout) * time.Second,
Transport: t,
}
return client, nil
}
client := &http.Client{
Timeout: 30 * time.Second,
Timeout: time.Duration(i.Timeout) * time.Second,
}
return client, nil
}