mirror of
https://github.com/immich-app/immich.git
synced 2024-12-25 10:43:13 +02:00
fix: trusted proxies
This commit is contained in:
parent
b88f98bf66
commit
404a6ac0d4
@ -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'],
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -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: {
|
||||||
|
@ -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' }));
|
||||||
|
Loading…
Reference in New Issue
Block a user