File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ Freedom of information is an essential pillar of democracy and informed decision
30
30
- [x] Disable logs
31
31
- [x] No Tracking
32
32
- [x] Limit the proxy to a list of domains
33
+ - [x] Expose Ruleset to other ladders
33
34
- [ ] Optional TOR proxy
34
35
- [ ] A key to share only one URL
35
36
- [ ] Fetch from Google Cache if not available
@@ -77,6 +78,10 @@ curl -X GET "http://localhost:8080/api/https://www.example.com"
77
78
### RAW
78
79
http://localhost:8080/raw/https://www.example.com
79
80
81
+
82
+ ### Running Ruleset
83
+ http://localhost:8080/ruleset
84
+
80
85
## Configuration
81
86
82
87
### Environment Variables
Original file line number Diff line number Diff line change 1
1
package handlers
2
2
3
3
import (
4
+ "os"
5
+
4
6
"github.com/gofiber/fiber/v2"
5
7
"gopkg.in/yaml.v3"
6
8
)
7
9
8
10
func Ruleset (c * fiber.Ctx ) error {
9
11
12
+ if os .Getenv ("EXPOSE_RULESET" ) == "false" {
13
+ c .SendStatus (fiber .StatusForbidden )
14
+ return c .SendString ("Rules Disabled" )
15
+ }
16
+
10
17
body , err := yaml .Marshal (rulesSet )
11
18
if err != nil {
12
19
c .SendStatus (fiber .StatusInternalServerError )
You can’t perform that action at this time.
0 commit comments