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:
parent
b88f98bf66
commit
404a6ac0d4
3 changed files with 3 additions and 3 deletions
|
@ -204,7 +204,7 @@ describe('getEnv', () => {
|
|||
it('should return default network options', () => {
|
||||
const { network } = getEnv();
|
||||
expect(network).toEqual({
|
||||
trustedProxies: [],
|
||||
trustedProxies: ['linklocal', 'uniquelocal'],
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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' }));
|
||||
|
|
Loading…
Reference in a new issue