2 from . import app, CONFIG
3 from .database import DATABASE
5 host = CONFIG['ap']['host']
7 targets = '<br>'.join([target for target in DATABASE.get('relay-list', [])])
9 async def default(request):
10 return aiohttp.web.Response(
12 content_type="text/html",
16 <title>ActivityPub Relay at {host}</title>
18 p {{ color: #FFFFFF; font-family: monospace, arial; font-size: 100%; }}
19 body {{ background-color: #000000; }}
23 <p>This is an Activity Relay for fediverse instances.</p>
25 <p>For Mastodon instances, you may subscribe to this relay with the address: <a href="https://{host}/inbox">https://{host}/inbox</a></p>
26 <p>For Pleroma and other instances, you may subscribe to this relay with the address: <a href="https://{host}/actor">https://{host}/actor</a></p>
27 <p>To host your own relay, you may download the code at this address: <a href="https://git.pleroma.social/pleroma/relay">https://git.pleroma.social/pleroma/relay</a></p>
28 <br><p>List of registered instances:<br>{targets}</p>
31 """.format(host=host, note=note,targets=targets))
33 app.router.add_get('/', default)