feat(api): scope forwarded client ip trust per caller (#3198)

This commit is contained in:
Hampus
2026-10-04 16:36:41 +02:00
committed by GitHub
parent 2ac164d5b8
commit 0aeff01c2d
15 changed files with 352 additions and 30 deletions
+1
View File
@@ -98,6 +98,7 @@ function defaultConfig(): MasterConfig {
max_inflight_requests: 512,
ip_ban_exempt_ips: [],
donation_proxy_key: '',
trusted_callers: [],
presigned_attachment_uploads_enabled: false,
presigned_harvest_downloads_enabled: true,
unfurl_ignored_hosts: [],
+5
View File
@@ -86,6 +86,11 @@ export interface MasterConfig {
max_inflight_requests: number;
ip_ban_exempt_ips: Array<string>;
donation_proxy_key: string;
trusted_callers: Array<{
name: string;
key: string;
buckets: Array<string>;
}>;
presigned_attachment_uploads_enabled: boolean;
presigned_harvest_downloads_enabled: boolean;
unfurl_ignored_hosts: Array<string>;
@@ -73,6 +73,7 @@ const NAMED_FLUXER_ENV_OVERRIDES: Record<string, NamedEnvOverride> = {
FLUXER_API_MAX_INFLIGHT_REQUESTS: {path: ['services', 'api', 'max_inflight_requests'], parse: parseInteger},
FLUXER_API_IP_BAN_EXEMPT_IPS: {path: ['services', 'api', 'ip_ban_exempt_ips'], parse: parseCsv},
FLUXER_API_DONATION_PROXY_KEY: {path: ['services', 'api', 'donation_proxy_key']},
FLUXER_API_TRUSTED_CALLERS: {path: ['services', 'api', 'trusted_callers'], parse: parseJsonArray},
FLUXER_API_PRESIGNED_ATTACHMENT_UPLOADS_ENABLED: {
path: ['services', 'api', 'presigned_attachment_uploads_enabled'],
parse: parseBoolean,