Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion yunodiagnoser.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from sanic import Sanic
from sanic.log import logger
from sanic.response import html, json as json_response
from sanic.response import html, raw, json as json_response
from sanic.exceptions import InvalidUsage

app = Sanic(__name__)
Expand Down Expand Up @@ -389,6 +389,16 @@ async def check_smtp(request):
return json_response({'status': 'ok', 'helo': helo_domain})


@app.route("/robots.txt")
async def robots(request):
return raw(
"""
User-agent: *
Disallow: /
"""
)


@app.route("/")
async def main(request):
return html("You aren't really supposed to use this website using your browser.<br><br>It's a small server with an API to check if a services running on YunoHost instance can be reached from 'the global internet'.")
Expand Down