diff options
| author | Yuval Adam <_@yuv.al> | 2018-10-11 17:07:15 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2018-10-11 17:07:15 +0200 |
| commit | ced815726b12dd7158b3f5f173d39250c9812b9a (patch) | |
| tree | 01ffe4806224be8448cf4915c75254adf5d732ac /app.py | |
| parent | 8fa363de6fff88f6d80a4bd6dbc2fc141e5a6ed8 (diff) | |
Add plaintext template
Diffstat (limited to 'app.py')
| -rw-r--r-- | app.py | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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) |
