removing unnecessary piece of code

This commit is contained in:
snfsx 2025-04-19 13:28:19 +00:00
parent 1f4813befc
commit bf08fbfc04
Signed by: snfsx
GPG key ID: B663DED13303E929

10
app.py
View file

@ -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():