added an index redirect page
All checks were successful
ci / docker (push) Successful in 27s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s

This commit is contained in:
Nathan Windisch 2025-03-20 12:29:20 +00:00
parent 8f804a6905
commit 024f0d2291

16
main.py
View File

@ -7,12 +7,26 @@ import json
app = FastAPI()
@app.get("/")
def root():
content = """<!DOCTYPE html>
<html>
<head>
<title>Autodiscover Lookup</title>
<script defer data-domain="wnd.sh" src="https://stats.wnd.sh/js/script.outbound-links.tagged-events.js"></script>
<meta http-equiv="refresh" content="0; url=https://autodiscover-proxy.apps.wnd.sh/docs" />
</head>
<body>
<p><a href="https://autodiscover-proxy.apps.wnd.sh/docs">Redirecting...</a></p>
</body>
</html>"""
@app.get("/api/v1/health")
def health():
return { "status": "ok" }
@app.get("/api/v1/lookup/{domain}")
def read_root(
def lookup_domain(
domain: str,
platform: Annotated[
str | None,