summaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2018-10-11 17:07:15 +0200
committerYuval Adam <_@yuv.al>2018-10-11 17:07:15 +0200
commitced815726b12dd7158b3f5f173d39250c9812b9a (patch)
tree01ffe4806224be8448cf4915c75254adf5d732ac /app.py
parent8fa363de6fff88f6d80a4bd6dbc2fc141e5a6ed8 (diff)
Add plaintext template
Diffstat (limited to 'app.py')
-rw-r--r--app.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/app.py b/app.py
index caa23eb..a8d56a6 100644
--- a/app.py
+++ b/app.py
@@ -3,6 +3,16 @@ from os import environ
app = Flask(__name__)
+TEMPLATE = '''
+/----------------------------------------\\
+| {ip:39}|
+| |
+| Created by Yuval Adam |
+| https://github.com/yuvadm/ipcli.app |
+| Comments welcome at hello@ipcli.app |
+\\----------------------------------------/
+'''
+
def get_ip(request):
if 'PROD' in environ:
# Heroku routing layers masks the original IP, fetch it from the custom header
@@ -14,4 +24,5 @@ def get_ip(request):
@app.route('/')
def index():
- return get_ip(request)
+ ip = get_ip(request)
+ return TEMPLATE.format(ip=ip)