No description
  • Go 69.2%
  • Nix 30.8%
Find a file
2026-04-13 13:46:51 +02:00
fi.go last commit 2026-04-13 13:46:51 +02:00
flake.lock last commit 2026-04-13 13:46:51 +02:00
flake.nix last commit 2026-04-13 13:46:51 +02:00
go.mod last commit 2026-04-13 13:46:51 +02:00
go.sum last commit 2026-04-13 13:46:51 +02:00
README.md last commit 2026-04-13 13:46:51 +02:00

curl -X POST -d @flake.nix http://localhost:9172/foo go run fi.go -S -d fi.rcast.dev

todo: add whitelist/blacklist middlewares

if _, blocked := blacklist[ip]; blocked {
    l.Printf("blocked (blacklist): %s", ip)
    http.Error(w, "forbidden", http.StatusForbidden)
    return
}

if len(whitelist) > 0 {
    if _, allowed := whitelist[ip]; !allowed {
        l.Printf("blocked (not in whitelist): %s", ip)
        http.Error(w, "forbidden", http.StatusForbidden)
        return
    }