mirror of
https://github.com/kovetskiy/mark.git
synced 2026-04-20 21:32:33 +00:00
feature: Add --insecure flag for ignoring tls errors
This commit is contained in:
committed by
Manuel Rüger
parent
be4ff0d58a
commit
b36d7aa135
@@ -49,7 +49,7 @@ func RunMark(ctx context.Context, cmd *cli.Command) error {
|
||||
return err
|
||||
}
|
||||
|
||||
api := confluence.NewAPI(creds.BaseURL, creds.Username, creds.Password)
|
||||
api := confluence.NewAPI(creds.BaseURL, creds.Username, creds.Password, cmd.Bool("insecure"))
|
||||
|
||||
files, err := doublestar.FilepathGlob(cmd.String("files"))
|
||||
if err != nil {
|
||||
|
||||
@@ -196,6 +196,12 @@ var Flags = []cli.Flag{
|
||||
Usage: "Enables optional features. Current features: d2, mermaid, mkdocsadmonitions",
|
||||
Sources: cli.NewValueSourceChain(cli.EnvVar("MARK_FEATURES"), altsrctoml.TOML("features", altsrc.NewStringPtrSourcer(&filename))),
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "insecure",
|
||||
Value: false,
|
||||
Usage: "skip TLS certificate verification (useful for self-signed certificates)",
|
||||
Sources: cli.NewValueSourceChain(cli.EnvVar("MARK_INSECURE"), altsrctoml.TOML("insecure", altsrc.NewStringPtrSourcer(&filename))),
|
||||
},
|
||||
}
|
||||
|
||||
// CheckMutuallyExclusiveTitleFlags checks if both title-from-h1 and title-from-filename are set
|
||||
|
||||
Reference in New Issue
Block a user