4 ms·
Alternatively, with Caddy (with automated TLS, single static binary): example.com { handle /ip { header Content-Type application/json
by francislavoie 3y ago
Alternatively, with Caddy (with automated TLS, single static binary):
example.com {
handle /ip {
header Content-Type application/json
respond `{"host":"{host}","ip":"{remote_host}","port":"{remote_port}"}`
}
}
Though the usefulness of the host (client specified it), remote port (it's random), and server ip/port (it's static and not useful for the client) are questionable.
- quickthrower2 3y agoUseful for UA sanity checking I guess