Commit 869e18e 1 parent caefdd8 commit 869e18e Copy full SHA for 869e18e
File tree 3 files changed +18
-8
lines changed
3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ docker-compose up -d
29
29
If ``` grimd.toml ``` is not found, it will be generated for you, below is the default configuration.
30
30
``` toml
31
31
# version this config was generated from
32
- version = " 1.0.8 "
32
+ version = " 1.0.9 "
33
33
34
34
# list of sources to pull blocklists from, stores them in ./sources
35
35
sources = [
@@ -58,6 +58,9 @@ logconfig = "file:grimd.log@2,stderr@2"
58
58
# apidebug enables the debug mode of the http api library
59
59
apidebug = false
60
60
61
+ # enable the web interface by default
62
+ dashboard = true
63
+
61
64
# address to bind to for the DNS server
62
65
bind = " 0.0.0.0:53"
63
66
Original file line number Diff line number Diff line change @@ -58,13 +58,16 @@ func StartAPIServer(config *Config,
58
58
59
59
router .Use (cors .Default ())
60
60
61
- router .GET ("/" , func (c * gin.Context ) {
62
- c .Redirect (http .StatusTemporaryRedirect , "/dashboard" )
63
- c .Abort ()
64
- })
61
+ // Serves only if the user configuration enables the dashboard
62
+ if config .Dashboard {
63
+ router .GET ("/" , func (c * gin.Context ) {
64
+ c .Redirect (http .StatusTemporaryRedirect , "/dashboard" )
65
+ c .Abort ()
66
+ })
65
67
66
- dashboardAssets , _ := fs .Sub (dashboardAssets , "dashboard/reaper" )
67
- router .StaticFS ("/dashboard" , http .FS (dashboardAssets ))
68
+ dashboardAssets , _ := fs .Sub (dashboardAssets , "dashboard/reaper" )
69
+ router .StaticFS ("/dashboard" , http .FS (dashboardAssets ))
70
+ }
68
71
69
72
router .GET ("/blockcache" , func (c * gin.Context ) {
70
73
special := make ([]string , 0 , len (blockCache .Special ))
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import (
16
16
var BuildVersion = "1.0.7"
17
17
18
18
// ConfigVersion returns the version of grimd, this should be incremented every time the config changes so grimd presents a warning
19
- var ConfigVersion = "1.0.8 "
19
+ var ConfigVersion = "1.0.9 "
20
20
21
21
// Config holds the configuration parameters
22
22
type Config struct {
@@ -41,6 +41,7 @@ type Config struct {
41
41
CustomDNSRecords []string
42
42
ToggleName string
43
43
ReactivationDelay uint
44
+ Dashboard bool
44
45
APIDebug bool
45
46
DoH string
46
47
UseDrbl int
@@ -80,6 +81,9 @@ logconfig = "file:grimd.log@2,stderr@2"
80
81
# apidebug enables the debug mode of the http api library
81
82
apidebug = false
82
83
84
+ # enable the web interface by default
85
+ dashboard = true
86
+
83
87
# address to bind to for the DNS server
84
88
bind = "0.0.0.0:53"
85
89
You can’t perform that action at this time.
0 commit comments