Simple IP lookup service using Caddy

Running Caddy? Add this for an easy no-frills IP lookup service., {
	respond "{{.RemoteIP}}

Then using e.g. curl:

$ curl

Without the explicit http and https URL in the Caddyfile, caddy will redirect http to https which is fine in the browser but annoying for a quick curl command. You would just get a 302 response and no output. You can add -L but that's just annoying!

$ curl
$ curl -L

🗣 Comments

I manually review comments so it may take a while for your comment to get published.