Add secured subrouter for REST API

Rename IP filter option
Add array helper in util
This commit is contained in:
2023-08-14 14:33:05 +02:00
parent 42e05fc999
commit 90bdfcfbb6
3 changed files with 135 additions and 84 deletions

View File

@@ -70,8 +70,8 @@ type ProgramConfig struct {
// Address where the http (or https) server will listen on (for example: 'localhost:80').
Addr string `json:"addr"`
// Addresses from which the /secured/* API endpoints can be reached
ApiAllowedAddrs []string `json:"apiAllowedAddrs"`
// Addresses from which the /api/secured/* API endpoints can be reached
ApiAllowedIPs []string `json:"apiAllowedIPs"`
// Drop root permissions once .env was read and the port was taken.
User string `json:"user"`