After upgrading to gunicorn 19.0 the tornado worker which used to work with gunicorn 18.0 no longer does. It looks like the x_forwarded_for_header setting is no longer present in cfg (gunicorn.workers.gtornado.TornadoWorker @ run ~ line 95 or so), what's the expected way to use the new version?
[ERROR] Exception in worker process:
Traceback (most recent call last):
File ".../python2.7/site-packages/gunicorn/arbiter.py", line 502, in spawn_worker
File ".../python2.7/site-packages/gunicorn/workers/base.py", line 120, in init_process
File ".../python2.7/site-packages/gunicorn/workers/gtornado.py", line 96, in run
server.xheaders = bool(self.cfg.x_forwarded_for_header)
File ".../python2.7/site-packages/gunicorn/config.py", line 55, in __getattr__
raise AttributeError("No configuration setting for: %s" % name)
AttributeError: No configuration setting for: x_forwarded_for_header
@benoitc looks like we broke tornado for real. We should do a quick fix release.
fix #783 fix tornado worker with missing option
Gunicorn doesn't ovveride the WSGI headers with the X heaaders anymore.
@tilgovi fixed. I will make a release today .
@g-p-g thanks for the report
@benoitc that fix looks strange for an outsider as the removed line used to work before. Could you possibly point to some commit(s) that modified that behavior so it's no longer necessary to deal with X-FORWARDED-FOR in the tornado worker? Thanks.
My bad I forgot to document it in the changelog. will do in the next one.
@g-p-g also you can find the discussion in #633
@benoitc thanks for the attention, both are helpful.
fix #783 : link to the corresponding discussion in the changelog