mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
feat(api): scope forwarded client ip trust per caller (#3198)
This commit is contained in:
@@ -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: [],
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user