Show the IP information API on the home page (closes #156)
check / check (push) Canceled after 0s

The home page gets an IP information API card. It shows the curl
command that asks /ip/ about the visitor's own address. The page then
makes that same request and shows the JSON answer, pretty-printed. An
error answer, such as a 404 for an address with no route, is shown the
same way. A request that fails shows an error line.

The server gives the page the visitor's address, found as /ip/ finds
it, so a trusted proxy's X-Forwarded-For is honoured. The command takes
its origin from the browser, so it names the host the visitor used.

Model: opus-5-5
This commit is contained in:
2026-10-27 04:03:33 +00:00
parent 203a4e13a5
commit 6e4b41c09f
7 changed files with 129 additions and 11 deletions
+3
View File
@@ -33,6 +33,9 @@ tested.
# Completed Steps
- 2026-10-27: the home page has an IP information API card. It shows the `curl`
command that asks `/ip/` about the visitor's own address, and the live answer
to that request (closes #156)
- 2026-10-27: on the AS page, a click on the heading of the IPv4 or the IPv6
prefix list folds or unfolds the list. Both lists start open (closes #155)
- 2026-10-27: the AS page lists its IPv4 and its IPv6 prefixes by mask length,