From 6a7841c3f99c24976e75b292eeabd4b206482214 Mon Sep 17 00:00:00 2001 From: Alex Kelly Date: Fri, 3 Jan 2020 20:19:10 -0500 Subject: [PATCH 1/3] fixed requirements for bottle --- requirements.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a6d2d3a..106dbfc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,12 @@ +bottle==0.12.18 +certifi==2019.11.28 +chardet==3.0.4 Click==7.0 -Flask==1.1.1 +idna==2.8 itsdangerous==1.1.0 Jinja2==2.10.3 +json2html==1.3.0 MarkupSafe==1.1.1 +requests==2.22.0 +urllib3==1.25.7 Werkzeug==0.16.0 From d7268587845adfa8d2189f91b026d774c2cfb0d6 Mon Sep 17 00:00:00 2001 From: Alex Kelly Date: Fri, 3 Jan 2020 20:44:30 -0500 Subject: [PATCH 2/3] bound port to all IPs --- chainlink.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chainlink.py b/chainlink.py index e49f722..c7f43c7 100755 --- a/chainlink.py +++ b/chainlink.py @@ -63,4 +63,4 @@ def redirectDomain(domain, action=None): return json2html.json2html.convert(json = body) if __name__ == "__main__": - run(app, host='localhost', port='5000', reloader=True) + run(app, host='0.0.0.0', port='5000', reloader=True) From 8fcd97edf0b698e2e0d0e820c5efa84c16cca036 Mon Sep 17 00:00:00 2001 From: Alex Kelly Date: Sat, 4 Jan 2020 23:29:30 -0500 Subject: [PATCH 3/3] fixed helptext html formatting --- chainlink.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chainlink.py b/chainlink.py index c7f43c7..39297e8 100755 --- a/chainlink.py +++ b/chainlink.py @@ -15,16 +15,18 @@ def root(): host = request.get_header('host') helptext = f"""

General format is {host}/<domain>/<action> -

If is blank, it will attempt to use the redirect +

If <action> is blank, it will attempt to use the redirect

You may also/optionally specify an action which can be any of the following + +
raw Show the raw json (formatted as an html table)
html Hit the IPFS hash via cloudflare-ipfs.com
redir Use the redirect parameter and just return a 302 redirect to whatever is set