From b93515ff32bdbdc779414f55114efb447f0022d5 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Tue, 2 Jul 2024 13:48:16 +1000 Subject: [PATCH] feat: Add XRP toml --- .well-known/xrp-ledger.toml | 12 ++++++++++++ server.py | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .well-known/xrp-ledger.toml diff --git a/.well-known/xrp-ledger.toml b/.well-known/xrp-ledger.toml new file mode 100644 index 0000000..fb8c681 --- /dev/null +++ b/.well-known/xrp-ledger.toml @@ -0,0 +1,12 @@ +[METADATA] +modified = 2024-07-02T00:00:00.000Z +expires = 2050-07-02T00:00:00.000Z + +[[ACCOUNTS]] +address = "rKzdnYvwDyeki5VCgMwjuofjBjAbg3DJnB" +desc = "Nathan.Woodburn/ (Twitter: @nathanwoodburn)" + +[[PRINCIPALS]] +name = "Nathan Woodburn" +email = "xrp@nathan.woodburn.au" +social_1 = "https://nathan.woodburn.au" \ No newline at end of file diff --git a/server.py b/server.py index c3e39cc..7454ae2 100644 --- a/server.py +++ b/server.py @@ -137,6 +137,18 @@ def nostr(): } }) +@app.route('/.well-known/xrp-ledger.toml') +def xrpLedger(): + # Create a response with the xrp-ledger.toml file + with open('.well-known/xrp-ledger.toml') as file: + toml = file.read() + + response = make_response(toml, 200, {'Content-Type': 'application/toml'}) + # Set cors headers + response.headers['Access-Control-Allow-Origin'] = '*' + return response + + @app.route('/manifest.json') def manifest():