hmm ... I guess I don't completely understand what's the purpose of
use_port? say the port is 4567 and use_port is false, can I access nodebb
on http://localhost with no port specified?
isn't implied that if you are using anything besides 80 and 443, you MUST
have a port in the url?



On Sat, Feb 8, 2014 at 3:52 PM, Julian Lam <notifications@github.com> wrote:

> In src/webserver.js:
>
> > -				// so unless it's specifically set to false, it's true (as long as it's not a dev env)
> > -				// todo: remove double negative with a minor release, where backward compatibility can be broken
> > -				// and if dev mode, then it's probably not behind a proxy but it can be forced by setting 'use_proxy' to true
> > -
> > -				if (nconf.get('use_proxy') === false) {
> > -					winston.info('\'use_proxy\' is set to false in config file, skipping \'trust proxy\'');
> > -
> > -				} else if (!nconf.get('use_proxy') && process.env.NODE_ENV === 'development') {
> > -					winston.info('\'use_proxy\' is not set, skipping because you\'re in development env. Set to true to force enabling it.');
> > -
> > -				} else {
> > -					winston.info('\'use_proxy\''
> > -						+ (nconf.get('use_proxy') === true ? ' is set to true ' : ' is not set ')
> > -						+ 'in config file, enabling \'trust proxy\', set to false to disable it.');
> > -
> > +				if (nconf.get('port') != 80 && nconf.get('port') != 443 && nconf.get('use_port') === true) {
>
> Hey @akhoury <https://github.com/akhoury> -- how come the conditional
> check here is checking if use_port is true? I thought we'd be assuming a
> connection is proxied if use_port is false and the port is not 80 or 443?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/designcreateplay/NodeBB/pull/862/files#r9566956>
> .
>