Using app.set to set trust proxy
问题 When setting the application variable trust proxy , does the second argument in app.set mean that the server trusts all the requests FROM 127.0.0.1 or TO 127.0.0.1? For example: app.set('trust proxy', 'loopback'); // or app.set('trust proxy', '127.0.0.1'); and then var sess = { proxy: true cookie: { httpOnly: true, secure: true } } According to the documentation, several types of value are allowed as the second argument: Boolean If true, the client’s IP address is understood as the left-most