-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add --user to check-http #297
Conversation
Hi, thank you for your contribution! You can also specify user info in urls like |
Hi,
i was not aware of this (as i tried to avoid this syntax since years), but
yes, you’re right.
One reason to keep user:pass separate from the url is the usage of the url
in notifications or the gui, where you probably don’t want to show login
credentials.
Gerhard
Von: Susisu [mailto:[email protected]]
Gesendet: Montag, 19. August 2019 05:10
An: mackerelio/go-check-plugins <[email protected]>
Cc: Gerhard Lausser <[email protected]>; Author
<[email protected]>
Betreff: Re: [mackerelio/go-check-plugins] add --user to check-http (#297)
Hi, thank you for your contribution!
You can also specify user info in urls like
https://user:[email protected]/, is this not preferable?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#297?email_source=notifications&email_token=AABQSOHSGOVSBZBRLDOZP4TQFIFKFA5CNFSM4IJZWPNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4RR5NI#issuecomment-522395317>
, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABQSOFNOSCX7QR423WOCG3QFIFKFANCNFSM4IJZWPNA>
.
<https://github.com/notifications/beacon/AABQSODOFEGICNWT5Y5TEW3QFIFKFA5CNFSM4IJZWPNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4RR5NI.gif>
|
check-http/lib/check_http.go
Outdated
@@ -32,6 +32,7 @@ type checkHTTPOpts struct { | |||
MaxRedirects int `long:"max-redirects" description:"Maximum number of redirects followed" default:"10"` | |||
ConnectTos []string `long:"connect-to" value-name:"HOST1:PORT1:HOST2:PORT2" description:"Request to HOST2:PORT2 instead of HOST1:PORT1"` | |||
Proxy string `short:"x" long:"proxy" value-name:"[PROTOCOL://][USER:PASS@]HOST[:PORT]" description:"Use the specified proxy. PROTOCOL's default is http, and PORT's default is 1080."` | |||
BasicAuth string `long:"user" description:"<user:password> Server user and password."` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend using value-name
tag, like value-name:"USER[:PASSWORD]"
.
@lausser Can you fix #297 (comment), please? |
Finally, after an hour of commits, rebase, squash and all that can go wrong :-)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
Just a small improvement so you can check a website which requires basic auth. (i called it "--user" because that's how this parameter is called in curl)