feat(hook): add AllowInsecure option for TLS verification
Some checks failed
CI / Test (1.23) (push) Failing after -20m40s
CI / Test (1.22) (push) Failing after -20m33s
CI / Build (push) Failing after -23m2s
CI / Lint (push) Failing after -22m34s

* Introduced AllowInsecure field in Hook configuration to skip TLS certificate verification.
* Updated database schema and models to support the new field.
* Modified HTTP client behavior based on AllowInsecure setting.
This commit is contained in:
Hein
2026-02-20 15:33:53 +02:00
parent 35a548e7e2
commit 3fb65e0285
8 changed files with 37 additions and 16 deletions

View File

@@ -11,6 +11,7 @@ type ModelPublicHook struct {
bun.BaseModel `bun:"table:hooks,alias:hooks"`
ID resolvespec_common.SqlString `bun:"id,type:varchar(36),pk," json:"id"` // UUID
Active bool `bun:"active,type:boolean,default:true,notnull," json:"active"`
AllowInsecure bool `bun:"allow_insecure,type:boolean,default:false,notnull," json:"allow_insecure"` // Skip TLS certificate verification
CreatedAt resolvespec_common.SqlTime `bun:"created_at,type:timestamp,default:now(),notnull," json:"created_at"`
DeletedAt resolvespec_common.SqlTime `bun:"deleted_at,type:timestamp,nullzero," json:"deleted_at"`
Description resolvespec_common.SqlString `bun:"description,type:text,nullzero," json:"description"`