1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-28 06:31:58 +00:00

fix: trusted proxies

This commit is contained in:
Daniel Dietzler 2024-12-23 20:27:36 +01:00
parent b88f98bf66
commit 404a6ac0d4
No known key found for this signature in database
GPG key ID: A1C0B97CD8E18DFF
3 changed files with 3 additions and 3 deletions

View file

@ -204,7 +204,7 @@ describe('getEnv', () => {
it('should return default network options', () => { it('should return default network options', () => {
const { network } = getEnv(); const { network } = getEnv();
expect(network).toEqual({ expect(network).toEqual({
trustedProxies: [], trustedProxies: ['linklocal', 'uniquelocal'],
}); });
}); });

View file

@ -177,7 +177,7 @@ const getEnv = (): EnvData => {
licensePublicKey: isProd ? productionKeys : stagingKeys, licensePublicKey: isProd ? productionKeys : stagingKeys,
network: { network: {
trustedProxies: dto.IMMICH_TRUSTED_PROXIES ?? [], trustedProxies: dto.IMMICH_TRUSTED_PROXIES ?? ['linklocal', 'uniquelocal'],
}, },
otel: { otel: {

View file

@ -32,7 +32,7 @@ async function bootstrap() {
logger.setContext('Bootstrap'); logger.setContext('Bootstrap');
app.useLogger(logger); app.useLogger(logger);
app.set('trust proxy', ['loopback', 'linklocal', 'uniquelocal', ...network.trustedProxies]); app.set('trust proxy', ['loopback', ...network.trustedProxies]);
app.set('etag', 'strong'); app.set('etag', 'strong');
app.use(cookieParser()); app.use(cookieParser());
app.use(json({ limit: '10mb' })); app.use(json({ limit: '10mb' }));