mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-16 18:16:24 -07:00
Set up lua GeoIP handler registration and Cloudflare GeoIP header example plugin
This commit is contained in:
parent
c26b7e9e1d
commit
39908d74c6
4 changed files with 166 additions and 2 deletions
|
@ -30,8 +30,8 @@ func main() {
|
|||
fmt.Println("Cleaning up")
|
||||
gcsql.Close()
|
||||
gcutil.CloseLog()
|
||||
gcplugin.ClosePlugins()
|
||||
geoip.Close()
|
||||
gcplugin.ClosePlugins()
|
||||
}()
|
||||
|
||||
fmt.Printf("Starting gochan v%s\n", versionStr)
|
||||
|
@ -78,7 +78,9 @@ func main() {
|
|||
parseCommandLine()
|
||||
serverutil.InitMinifier()
|
||||
siteCfg := config.GetSiteConfig()
|
||||
geoip.SetupGeoIP(siteCfg.GeoIPType, siteCfg.GeoIPOptions)
|
||||
if err = geoip.SetupGeoIP(siteCfg.GeoIPType, siteCfg.GeoIPOptions); err != nil {
|
||||
gcutil.LogFatal().Err(err).Msg("Unable to initialize GeoIP")
|
||||
}
|
||||
posting.InitCaptcha()
|
||||
|
||||
if err = gctemplates.InitTemplates(); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue