Enhance configuration and documentation for CIDR and IP handling. Updated config.example.yaml to include additional whitelisted IPs and new server entries. Improved GATEWAY_RUN.md to clarify CIDR and single IP usage. Implemented parseCIDROrIP function in config.go for better validation of IP formats in whitelist and trusted proxies.
Publish telemt-api gateway Docker image / test (push) Successful in 39s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 1m45s

This commit is contained in:
Denozordec
2026-03-30 00:00:49 +07:00
parent 073d2b2c09
commit e58f504395
4 changed files with 56 additions and 7 deletions
+1
View File
@@ -60,6 +60,7 @@ servers:
Правила:
- При `allow_all: false` и **пустом** `whitelist_cidrs` доступ будет **закрыт для всех** (кроме `GET /health`).
- В `whitelist_cidrs` и `trusted_proxies` допустимы **CIDR** (`10.0.0.0/8`) и **одиночный IPv4/IPv6** без маски (`87.103.241.8` эквивалентно `87.103.241.8/32`).
- `GET /health` на шлюзе **не** проверяется по whitelist — так проще настроить Docker `HEALTHCHECK` и оркестраторы.
- Поле `path_prefix` по умолчанию равно `/v1` (префикс Telemt Control API).