Skip to content

Commit

Permalink
fix: trusted proxies
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldietzler committed Dec 23, 2024
1 parent b88f98b commit b76cfa6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/src/repositories/config.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion server/src/workers/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' }));
Expand Down

0 comments on commit b76cfa6

Please sign in to comment.