mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-09-08 04:05:23 -04:00
feat(cli): Add --version flag (#572)
This commit is contained in:
parent
9ba10262e3
commit
eeae28f459
@ -67,6 +67,7 @@ var (
|
|||||||
ogCacheConsiderHost = flag.Bool("og-cache-consider-host", false, "enable or disable the use of the host in the Open Graph tag cache")
|
ogCacheConsiderHost = flag.Bool("og-cache-consider-host", false, "enable or disable the use of the host in the Open Graph tag cache")
|
||||||
extractResources = flag.String("extract-resources", "", "if set, extract the static resources to the specified folder")
|
extractResources = flag.String("extract-resources", "", "if set, extract the static resources to the specified folder")
|
||||||
webmasterEmail = flag.String("webmaster-email", "", "if set, displays webmaster's email on the reject page for appeals")
|
webmasterEmail = flag.String("webmaster-email", "", "if set, displays webmaster's email on the reject page for appeals")
|
||||||
|
versionFlag = flag.Bool("version", false, "print Anubis version")
|
||||||
)
|
)
|
||||||
|
|
||||||
func keyFromHex(value string) (ed25519.PrivateKey, error) {
|
func keyFromHex(value string) (ed25519.PrivateKey, error) {
|
||||||
@ -202,6 +203,11 @@ func main() {
|
|||||||
flagenv.Parse()
|
flagenv.Parse()
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
if *versionFlag {
|
||||||
|
fmt.Println("Anubis", anubis.Version)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
internal.InitSlog(*slogLevel)
|
internal.InitSlog(*slogLevel)
|
||||||
|
|
||||||
if *extractResources != "" {
|
if *extractResources != "" {
|
||||||
|
@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Add `--target-sni` flag/envvar to allow changing the value of the TLS handshake hostname in requests forwarded to the target service.
|
- Add `--target-sni` flag/envvar to allow changing the value of the TLS handshake hostname in requests forwarded to the target service.
|
||||||
- Fixed CEL expression matching validator to now properly error out when it receives empty expressions
|
- Fixed CEL expression matching validator to now properly error out when it receives empty expressions
|
||||||
- Added OpenRC init.d script.
|
- Added OpenRC init.d script.
|
||||||
|
- Added `--version` flag.
|
||||||
|
|
||||||
## v1.18.0: Varis zos Galvus
|
## v1.18.0: Varis zos Galvus
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user