-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add headers field in ruleset. Enable Google Cache.
- Loading branch information
1 parent
d3c995d
commit 6c1f58e
Showing
6 changed files
with
133 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ func main() { | |
app := fiber.New( | ||
fiber.Config{ | ||
Prefork: *prefork, | ||
GETOnly: true, | ||
}, | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package handlers | ||
|
||
type Regex struct { | ||
Match string `yaml:"match"` | ||
Replace string `yaml:"replace"` | ||
} | ||
|
||
type RuleSet []Rule | ||
|
||
type Rule struct { | ||
Domain string `yaml:"domain"` | ||
Domains []string `yaml:"domains,omitempty"` | ||
Paths []string `yaml:"paths,omitempty"` | ||
Headers struct { | ||
UserAgent string `yaml:"user-agent,omitempty"` | ||
XForwardedFor string `yaml:"x-forwarded-for,omitempty"` | ||
Referer string `yaml:"referer,omitempty"` | ||
Cookie string `yaml:"cookie,omitempty"` | ||
} `yaml:"headers,omitempty"` | ||
GoogleCache bool `yaml:"googleCache,omitempty"` | ||
RegexRules []Regex `yaml:"regexRules"` | ||
Injections []struct { | ||
Position string `yaml:"position"` | ||
Append string `yaml:"append"` | ||
Prepend string `yaml:"prepend"` | ||
Replace string `yaml:"replace"` | ||
} `yaml:"injections"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters