add feature to load ruleset from directory or gzip file on http server, refactor ruleset loading logic

This commit is contained in:
Kevin Pham
2023-11-14 15:57:39 -06:00
6 changed files with 137 additions and 45 deletions

View File

@@ -80,12 +80,8 @@ func main() {
}
app.Get("/", handlers.Form)
app.Get("ruleset", handlers.Ruleset)
app.Get("raw/*", handlers.Raw)
app.Get("api/*", handlers.Api)
app.Get("ruleset", handlers.Raw)
app.Get("/*", handlers.ProxySite(*ruleset))
log.Fatal(app.Listen(":" + *port))
}