0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-31 00:43:56 -05:00

fix: trusted proxies (#14888)

This commit is contained in:
Daniel Dietzler 2024-12-27 16:51:07 +01:00 committed by GitHub
parent 05cea0fc69
commit 139090715e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

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

View file

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

View file

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