Skip to content

Commit

Permalink
Create short routes for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
pnedkov committed Jan 21, 2024
1 parent 10ad1a1 commit 3b9002e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ipask/ipask.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def return_ip():
# /host route
# Returns the client's FQDN
#
@app.route("/h")
@app.route("/host")
def return_host():
c_ip = str(get_client_ip())
Expand All @@ -174,6 +175,7 @@ def return_xff():
# /city route
# Returns the client's city according to the local GeoIP database
#
@app.route("/ci")
@app.route("/city")
def return_city():
c_ip = get_client_ip()
Expand All @@ -186,6 +188,7 @@ def return_city():
# /country route
# Returns the client's country according to the local GeoIP database
#
@app.route("/co")
@app.route("/country")
def return_country():
c_ip = get_client_ip()
Expand All @@ -207,6 +210,7 @@ def return_ua():
# /headers route
# Returns all client's HTTP headers
#
@app.route("/he")
@app.route("/headers")
def return_headers():
return dict(request.headers)
Expand Down

0 comments on commit 3b9002e

Please sign in to comment.