fix: Use proxied IP address
All checks were successful
Build Docker / Build Image (push) Successful in 19s
All checks were successful
Build Docker / Build Image (push) Successful in 19s
This commit is contained in:
parent
f1d1504657
commit
8ddb039ca4
9
main.py
9
main.py
@ -31,6 +31,15 @@ def submit():
|
||||
email = request.form['email']
|
||||
hidden = request.form['hi']
|
||||
ip = request.remote_addr
|
||||
|
||||
if 'X-REAL-IP' in request.headers:
|
||||
print("X-REAL-IP",flush=True)
|
||||
ip = request.headers['X-REAL-IP']
|
||||
|
||||
if 'X-Real-Ip' in request.headers:
|
||||
print("X-Real-Ip2",flush=True)
|
||||
ip = request.headers['X-Real-Ip']
|
||||
|
||||
if hidden == '':
|
||||
hidden = 'None'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user