mirror of
https://github.com/Rayzggz/server_torii.git
synced 2025-06-21 14:31:31 +08:00
Merge pull request #3 from Rayzggz/bugfix/path-join
fix: File path error
This commit is contained in:
@ -100,25 +100,25 @@ func LoadRules(rulePath string) (*RuleSet, error) {
|
||||
}
|
||||
|
||||
// Load IP Allow List
|
||||
ipAllowFile := rulePath + "/IP_AllowList.conf"
|
||||
ipAllowFile := filepath.Join(rulePath, "/IP_AllowList.conf")
|
||||
if err := loadIPRules(ipAllowFile, rs.IPAllowTrie); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Load IP Block List
|
||||
ipBlockFile := rulePath + "/IP_BlockList.conf"
|
||||
ipBlockFile := filepath.Join(rulePath, "/IP_BlockList.conf")
|
||||
if err := loadIPRules(ipBlockFile, rs.IPBlockTrie); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Load URL Allow List
|
||||
urlAllowFile := rulePath + "/URL_AllowList.conf"
|
||||
urlAllowFile := filepath.Join(rulePath, "/URL_AllowList.conf")
|
||||
if err := loadURLRules(urlAllowFile, rs.URLAllowList); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Load URL Block List
|
||||
urlBlockFile := rulePath + "/URL_BlockList.conf"
|
||||
urlBlockFile := filepath.Join(rulePath, "/URL_BlockList.conf")
|
||||
if err := loadURLRules(urlBlockFile, rs.URLBlockList); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user