mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
refactor(ban): drop ipinfo cgnat blast-radius guard (#3062)
This commit is contained in:
@@ -215,9 +215,6 @@ function defaultConfig(): MasterConfig {
|
||||
},
|
||||
blocklist_feeds: {},
|
||||
breached_password_check: {},
|
||||
ipinfo: {
|
||||
api_key: '',
|
||||
},
|
||||
push: {
|
||||
apns: {
|
||||
enabled: false,
|
||||
|
||||
@@ -240,9 +240,6 @@ export interface MasterConfig {
|
||||
breached_password_check: {
|
||||
enabled?: boolean;
|
||||
};
|
||||
ipinfo: {
|
||||
api_key: string;
|
||||
};
|
||||
push: {
|
||||
apns: {
|
||||
enabled: boolean;
|
||||
|
||||
@@ -715,14 +715,6 @@ describe('ConfigLoader', () => {
|
||||
expect(config.integrations.breached_password_check.enabled).toBe(false);
|
||||
});
|
||||
|
||||
test('reads the IPinfo key from its current name before the previous one', async () => {
|
||||
stubMinimalEnv({FLUXER_RISK_IPINFO_API_KEY: 'previous'});
|
||||
expect((await loadConfig()).integrations.ipinfo.api_key).toBe('previous');
|
||||
resetConfig();
|
||||
stubMinimalEnv({FLUXER_IPINFO_API_KEY: 'current', FLUXER_RISK_IPINFO_API_KEY: 'previous'});
|
||||
expect((await loadConfig()).integrations.ipinfo.api_key).toBe('current');
|
||||
});
|
||||
|
||||
test('leaves Bluesky login off with no legal URLs by default', async () => {
|
||||
stubMinimalEnv();
|
||||
|
||||
|
||||
@@ -86,12 +86,9 @@ describe('buildNamedFluxerEnvOverrides', () => {
|
||||
buildNamedFluxerEnvOverrides({
|
||||
FLUXER_NATS_URL: '',
|
||||
FLUXER_NATS_CORE_URL: 'nats://alias',
|
||||
FLUXER_IPINFO_API_KEY: ' ',
|
||||
FLUXER_RISK_IPINFO_API_KEY: 'alias-key',
|
||||
}),
|
||||
).toMatchObject({
|
||||
services: {nats: {core_url: 'nats://alias'}},
|
||||
integrations: {ipinfo: {api_key: 'alias-key'}},
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -234,7 +234,6 @@ const NAMED_FLUXER_ENV_OVERRIDES: Record<string, NamedEnvOverride> = {
|
||||
path: ['integrations', 'breached_password_check', 'enabled'],
|
||||
parse: parseBoolean,
|
||||
},
|
||||
FLUXER_IPINFO_API_KEY: {path: ['integrations', 'ipinfo', 'api_key']},
|
||||
FLUXER_PUSH_APNS_ENABLED: {path: ['integrations', 'push', 'apns', 'enabled'], parse: parseBoolean},
|
||||
FLUXER_PUSH_APNS_TEAM_ID: {path: ['integrations', 'push', 'apns', 'team_id']},
|
||||
FLUXER_PUSH_APNS_KEY_ID: {path: ['integrations', 'push', 'apns', 'key_id']},
|
||||
@@ -396,7 +395,6 @@ export function setNestedValue(target: ConfigContainer, keys: Array<ConfigPathKe
|
||||
const NAMED_FLUXER_ENV_ALIASES: Record<string, string | undefined> = {
|
||||
FLUXER_INTERNAL_MEDIA_PROXY_ENDPOINT: 'FLUXER_MEDIA_PROXY_ENDPOINT',
|
||||
FLUXER_NATS_URL: 'FLUXER_NATS_CORE_URL',
|
||||
FLUXER_IPINFO_API_KEY: 'FLUXER_RISK_IPINFO_API_KEY',
|
||||
};
|
||||
|
||||
export const NAMED_FLUXER_ENV_NAMES = Object.keys(NAMED_FLUXER_ENV_OVERRIDES);
|
||||
|
||||
Reference in New Issue
Block a user