Log Connections #10
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Given this code, what would be the best way to log client IPs as they connect to the server?
The design of this library is almost identical to that of
net/http. So you'd need to write a middleware to wrap your handler. Does this help? If you can do this I'd love a PR that adds a middleware/ sub-package. Otherwise I'll try to find some time to do this...Thank you, yes, that helps. I'll write it sometime and let you know.
The attached patch adds a
RemoteAddrfield to thegopher.Request, similar tohttp.Request.I was unable to push to a fork of the repo on this server, so
git format-patchit is. Alternatively, it is available from my repo (theremote-addbranch).As for an example usage, see markdown-gopher (again, using the
remote-addbranch).@kensanata Thanks! Will apply this shortly. Sorry for the delay, work and all, been busy 🤣