mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Downloader: Add forwarding to HTTP endpoint (#442)
* started with forwarding support in downloader * Add missing files. * Add missing files. * Raise needed Go version * More Go version bumping. * Fix forwarding * Go 1.21+ needed * Make terminating forwarder more robust. * Better var naming * Remove dead code. Improve commentary. * Prepare validation status adjustment. * Move validations to functions to make them executable in a loop. * Introduce validation mode flag (strict, unsafe)
This commit is contained in:
parent
7d3c3a68df
commit
e0475791ff
13 changed files with 398 additions and 63 deletions
|
|
@ -30,6 +30,13 @@ func run(cfg *config, domains []string) error {
|
|||
ctx, stop := signal.NotifyContext(ctx, os.Interrupt)
|
||||
defer stop()
|
||||
|
||||
if cfg.ForwardURL != "" {
|
||||
f := newForwarder(cfg)
|
||||
go f.run()
|
||||
defer f.close()
|
||||
d.forwarder = f
|
||||
}
|
||||
|
||||
return d.run(ctx, domains)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue