Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c1a89b1

Browse files
committedOct 22, 2021
Initial commit
0 parents  commit c1a89b1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
 

‎app.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import flask
2+
3+
app = flask.Flask(__name__)
4+
5+
6+
@app.route('/')
7+
def ip(): # put application's code here
8+
if flask.request.remote_addr == '127.0.0.1':
9+
IP = flask.request.environ.get('HTTP_X_REAL_IP', flask.request.remote_addr)
10+
else:
11+
IP = flask.request.remote_addr
12+
return IP
13+
14+
15+
if __name__ == '__main__':
16+
app.run()

0 commit comments

Comments
 (0)
Please sign in to comment.