getAWFImageTag returns the AWF Docker image tag to use for the --image-tag flag. This ensures the AWF binary pulls its matching Docker image version instead of latest. Returns the version from firewall config if specified, otherwise returns the default version. The version is returned without the 'v
(firewallConfig *FirewallConfig)
| 224 | // Returns the version from firewall config if specified, otherwise returns the default version. |
| 225 | // The version is returned without the 'v' prefix (e.g., "0.7.0" instead of "v0.7.0"). |
| 226 | func getAWFImageTag(firewallConfig *FirewallConfig) string { |
| 227 | var version string |
| 228 | if firewallConfig != nil && firewallConfig.Version != "" { |
| 229 | version = firewallConfig.Version |
| 230 | firewallLog.Printf("Using custom AWF image tag: %s", version) |
| 231 | } else { |
| 232 | version = string(constants.DefaultFirewallVersion) |
| 233 | firewallLog.Printf("Using default AWF image tag: %s", version) |
| 234 | } |
| 235 | // Strip the 'v' prefix if present (AWF expects version without 'v' prefix) |
| 236 | return strings.TrimPrefix(version, "v") |
| 237 | } |
| 238 | |
| 239 | // getSSLBumpArgs returns the AWF arguments for SSL Bump configuration. |
| 240 | // Returns arguments for --ssl-bump and --allow-urls flags if SSL Bump is enabled. |