removing unnecessary piece of code
This commit is contained in:
parent
1f4813befc
commit
bf08fbfc04
1 changed files with 2 additions and 8 deletions
10
app.py
10
app.py
|
@ -119,15 +119,9 @@ def index():
|
|||
'year': datetime.datetime.now().year
|
||||
}
|
||||
|
||||
host = request.host.split(':')[0]
|
||||
ip = request.headers.get('X-Forwarded-For', request.remote_addr)
|
||||
return render_template('index.html', info=personal_info)
|
||||
|
||||
|
||||
if host == "snfsx.xyz" or host == "tests.snfsx.xyz":
|
||||
return render_template('index.html', info=personal_info)
|
||||
elif host == "ip.snfsx.xyz":
|
||||
return jsonify({"ip": ip})
|
||||
else:
|
||||
return jsonify({"error": "unknown host"})
|
||||
|
||||
@app.route('/api/v1/ip')
|
||||
def ip_return():
|
||||
|
|
Loading…
Add table
Reference in a new issue