mirror of
https://github.com/drone-plugins/drone-download.git
synced 2026-06-04 18:24:21 +08:00
added ability to specify a authorization header
This commit is contained in:
@@ -31,6 +31,11 @@ func main() {
|
||||
Usage: "destination for the download",
|
||||
EnvVar: "PLUGIN_DESTINATION",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "authorization",
|
||||
Usage: "value to send in the authorization header",
|
||||
EnvVar: "PLUGIN_AUTHORIZATION,DOWNLOAD_AUTHORIZATION",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "username",
|
||||
Usage: "username for basic auth",
|
||||
@@ -66,13 +71,14 @@ func main() {
|
||||
func run(c *cli.Context) error {
|
||||
plugin := Plugin{
|
||||
Config: Config{
|
||||
Source: c.String("source"),
|
||||
Destination: c.String("destination"),
|
||||
Username: c.String("username"),
|
||||
Password: c.String("password"),
|
||||
SkipVerify: c.Bool("skip-verify"),
|
||||
MD5: c.String("md5-checksum"),
|
||||
SHA265: c.String("sha265-checksum"),
|
||||
Source: c.String("source"),
|
||||
Destination: c.String("destination"),
|
||||
Authorization: c.String("authorization"),
|
||||
Username: c.String("username"),
|
||||
Password: c.String("password"),
|
||||
SkipVerify: c.Bool("skip-verify"),
|
||||
MD5: c.String("md5-checksum"),
|
||||
SHA265: c.String("sha265-checksum"),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user