This repository has no description
Something went wrong. Try again.
basic IP filtering net.Dialer for SSRF protection (#1057) master
Pulls in code from this 2019 blog post which still seems like the best pattern: https://www.agwa.name/blog/post/preventing_server_side_request_forgery_in_golang I looked around a bit and there are some packages that do similar things, but this seemed the best, and only a few dozen lines of code so just vendoring it in. This code has no deps, so I put it in a sub-package of `util`, which will make it painless to depend on from other code (eg, OAuth client, relay) without entangling with any new deps.
Author bnewbold Committer GitHub Date (Apr 30, 2025, 12:20 AM UTC) Commit 41da898e 41da898ead92823aff7ffd26dcaf7f2fa549f4b8 Parent 6ece2ee0 6ece2ee09543c9bf4dddd9bafcc1ca368737d33d