From 5fad763ae9a4cb2e54dcaf39ced57c8366e441a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20K=C3=A1rolyi?= Date: Sun, 27 May 2018 14:03:11 +0200 Subject: [PATCH] Adding proxyparameters --- daphne/cli.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/daphne/cli.py b/daphne/cli.py index 7361914..1df2ebd 100755 --- a/daphne/cli.py +++ b/daphne/cli.py @@ -132,6 +132,25 @@ class CommandLineInterface(object): default=False, action="store_true", ) + self.arg_proxy_host = self.parser.add_argument( + "--proxy-headers-host", + dest="proxy_headers_host", + help="Specify which header will be used for getting the host " + "part. Can be omitted, requires --proxy-headers to be specified " + "when passed. \"X-Real-IP\" (when passed by your webserver) is a " + "good candidate for this.", + default=False, + action="store", + ) + self.arg_proxy_port = self.parser.add_argument( + "--proxy-headers-port", + dest="proxy_headers_port", + help="Specify which header will be used for getting the port " + "part. Can be omitted, requires --proxy-headers to be specified " + "when passed.", + default=False, + action="store", + ) self.parser.add_argument( "application", help="The application to dispatch to as path.to.module:instance.path",