We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c2c97e commit d62ebffCopy full SHA for d62ebff
src/config/schema.ts
@@ -6,7 +6,7 @@ export interface ConfigurationItemEnabled {
6
}
7
8
export interface ConfigurationSchema extends BaseConfitSchema {
9
- trustProxy?: string[];
+ trustProxy?: string[] | boolean;
10
logging?: {
11
level?: Level;
12
logHttpRequests?: boolean;
src/express-app/app.ts
@@ -114,7 +114,9 @@ export async function startApp<
114
app.locals.meter = metrics.getMeterProvider().getMeter(name);
115
setupNodeMetrics(app.locals.meter, {});
116
117
- if (config.trustProxy) {
+ if (config.trustProxy === true) {
118
+ app.enable('trust proxy');
119
+ } else if (config.trustProxy) {
120
app.set('trust proxy', config.trustProxy);
121
122
0 commit comments