From ced815726b12dd7158b3f5f173d39250c9812b9a Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Thu, 11 Oct 2018 17:07:15 +0200 Subject: Add plaintext template --- app.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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) -- cgit v1.3.1