use/add proxy
This commit is contained in:
parent
1f91fd2334
commit
50862d2e8e
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
from flask import Flask, request, redirect, url_for
|
||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||
import os
|
||||
import sys
|
||||
import ipaddress
|
||||
|
@ -6,6 +7,7 @@ import random
|
|||
import subprocess
|
||||
|
||||
app = Flask(__name__)
|
||||
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1)
|
||||
|
||||
# where player are stored
|
||||
DB_DIR= "./db"
|
||||
|
@ -231,7 +233,6 @@ def save_network(address, network):
|
|||
fd.write("{}\n".format(network))
|
||||
|
||||
random_ip = get_random_ip(network)
|
||||
print("ip={}".format(random_ip))
|
||||
fname = os.path.join(dirname, "random_ip")
|
||||
with open(fname, "w+") as fd:
|
||||
fd.write("{}\n".format(random_ip))
|
||||
|
|
Loading…
Reference in a new issue