You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.go 1.3 kB

3 years ago
3 years ago
3 years ago
1234567891011121314151617181920212223242526272829303132333435363738
  1. package main
  2. import (
  3. "github.com/beego/beego"
  4. "github.com/beego/beego/plugins/cors"
  5. _ "github.com/beego/beego/session/redis"
  6. "github.com/casbin/casvisor/object"
  7. "github.com/casbin/casvisor/routers"
  8. )
  9. func main() {
  10. object.InitAdapter()
  11. beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
  12. AllowOrigins: []string{"*"},
  13. AllowMethods: []string{"GET", "POST", "DELETE", "PUT", "PATCH", "OPTIONS"},
  14. AllowHeaders: []string{"Origin", "X-Requested-With", "Content-Type", "Accept"},
  15. ExposeHeaders: []string{"Content-Length"},
  16. AllowCredentials: true,
  17. }))
  18. //beego.DelStaticPath("/static")
  19. beego.SetStaticPath("/static", "web/build/static")
  20. // https://studygolang.com/articles/2303
  21. beego.InsertFilter("/", beego.BeforeRouter, routers.TransparentStatic) // must has this for default page
  22. beego.InsertFilter("/*", beego.BeforeRouter, routers.TransparentStatic)
  23. if beego.AppConfig.String("redisEndpoint") == "" {
  24. beego.BConfig.WebConfig.Session.SessionProvider = "file"
  25. beego.BConfig.WebConfig.Session.SessionProviderConfig = "./tmp"
  26. } else {
  27. beego.BConfig.WebConfig.Session.SessionProvider = "redis"
  28. beego.BConfig.WebConfig.Session.SessionProviderConfig = beego.AppConfig.String("redisEndpoint")
  29. }
  30. beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 3600 * 24 * 365
  31. beego.Run()
  32. }

Caswire是一款基于人工智能技术的开源反病毒和入侵检测系统。该系统通过深度学习和模式识别技术,能够实时识别和防御各种网络威胁,包括病毒、恶意软件以及其他安全威胁。Caswire支持动态学习和适应网络环境的变化,确保持续的安全防护。我们期望在Caswire上:1)增强其机器学习模型,以提高恶意行为的检测准确率;2)优化系统的实时响应能力,提升在高威胁环境下的表现。