4
0
mirror of https://github.com/cwinfo/yggdrasil-map synced 2025-08-14 15:58:10 +00:00

adjustments for fc00.atomshare.net

This commit is contained in:
Michał Zieliński
2015-07-26 19:08:51 +02:00
parent c3779480de
commit 5ae90eeae3
5 changed files with 14 additions and 8 deletions

View File

@@ -7,7 +7,10 @@ app.config.from_pyfile('web_config.cfg')
@app.context_processor
def add_ip():
return dict(ip=request.environ['REMOTE_ADDR'])
ip = request.headers['x-real-ip']
if ip == '10.18.3.20':
ip = request.headers['x-atomshare-real-ip']
return dict(ip=ip)
@app.route('/')
@@ -31,4 +34,4 @@ def page_sendGraph():
return 'Error: %s' % ret
if __name__ == '__main__':
app.run(host='::')
app.run(host='localhost', port=3000)