Created
March 13, 2015 22:09
-
-
Save chadgh/b9debd2f00b6d3d353bf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request | |
app = Flask(__name__) | |
app.debug = False | |
@app.route('/') | |
def get_ip_address(): | |
style = """ | |
<style> | |
body { text-align: center; font-size: 8em; color: rgb(176, 204, 105); font-family: Courier; letter-spacing:-0.05em; margin-top: 25px; font-weight: bold; background: rgb(58, 58, 58); } | |
</style> | |
""" | |
return " ".join([style, str(request.remote_addr)]) | |
@app.route('/plain') | |
def get_ip_plain(): | |
return str(request.remote_addr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment