Add a flag to disable TCP scanning (#45)

* Add a flag to disable TCP scanning

* Move the option definition
This commit is contained in:
AdamB
2025-09-26 14:59:39 +01:00
committed by GitHub
parent 751e5f3885
commit 9b87d28433
2 changed files with 10 additions and 1 deletions

View File

@@ -24,7 +24,9 @@ func SetupTemplate(r *gin.Engine) {
func Setup(r *gin.Engine, geo *service.Geo) {
geoSvc = geo
r.GET("/", getRoot)
r.GET("/scan/tcp/:port", scanTCPPort)
if !setting.App.DisableTCPScan {
r.GET("/scan/tcp/:port", scanTCPPort)
}
r.GET("/client-port", getClientPortAsString)
r.GET("/geo", getGeoAsString)
r.GET("/geo/:field", getGeoAsString)