Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show original IP address of requests in AWS logs #1131

Merged
merged 1 commit into from
Feb 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cms/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def __init__(self):
self.admin_listen_address = ""
self.admin_listen_port = 8889
self.admin_cookie_duration = 10 * 60 * 60 # 10 hours
self.admin_num_proxies_used = None

# ProxyService.
self.rankings = ["http://usern4me:passw0rd@localhost:8890/"]
Expand Down
1 change: 1 addition & 0 deletions cms/server/admin/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def __init__(self, shard):
("cms.server.admin", "static")],
"cookie_secret": hex_to_bin(config.secret_key),
"debug": config.tornado_debug,
"num_proxies_used": config.admin_num_proxies_used,
"auth_middleware": AWSAuthMiddleware,
"rpc_enabled": True,
"rpc_auth": self.is_rpc_authorized,
Expand Down
6 changes: 6 additions & 0 deletions config/cms.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@
"_help": "The duration is refreshed on every manual request.",
"admin_cookie_duration": 36000,

"_help": "The number of proxies that will be crossed before AWS gets",
"_help": "the request. This is used to determine the request's real",
"_help": "source IP address. For example, if you're using nginx as",
"_help": "a proxy, you will likely want to set this value to 1.",
"admin_num_proxies_used": 0,



"_section": "ScoringService",
Expand Down