Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
qiuqunfeng
waf-console
Commits
089aec05
Commit
089aec05
authored
Feb 06, 2025
by
qiuqunfeng
Browse files
commit
parent
66bb1640
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
cmd/app/config.go
cmd/app/config.go
+1
-1
config/manifests.yaml
config/manifests.yaml
+2
-2
internal/service/waf.go
internal/service/waf.go
+1
-1
No files found.
cmd/app/config.go
View file @
089aec05
...
...
@@ -39,7 +39,7 @@ type RegionConfig struct {
}
func
LoadConfig
()
*
Config
{
configFile
:=
"config.yaml"
configFile
:=
"config
/config
.yaml"
if
envFile
:=
os
.
Getenv
(
"CONFIG_FILE"
);
envFile
!=
""
{
configFile
=
envFile
}
...
...
config/manifests.yaml
View file @
089aec05
...
...
@@ -13,7 +13,7 @@ spec:
spec
:
containers
:
-
name
:
waf-console
image
:
waf-console:
la
test
image
:
harbor.tensorsecurity.com/tensorsecurity/
waf-console:test
cn
resources
:
limits
:
memory
:
"
128Mi"
...
...
@@ -22,7 +22,7 @@ spec:
-
containerPort
:
8080
volumeMounts
:
-
name
:
waf-console-config
mountPath
:
/
mountPath
:
/
config
-
name
:
waf-console-rules
mountPath
:
/rules
volumes
:
...
...
internal/service/waf.go
View file @
089aec05
...
...
@@ -90,7 +90,7 @@ func (s *wafService) GetRule(ctx context.Context, ruleID int) (*WafRule, error)
func
(
s
*
wafService
)
SaveRuleCategoryToDB
(
ctx
context
.
Context
)
error
{
var
categories
[]
WafRuleCategory
yamlFile
,
err
:=
os
.
ReadFile
(
"waf-rules.yaml"
)
yamlFile
,
err
:=
os
.
ReadFile
(
"
rules/
waf-rules.yaml"
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"error reading yaml file: %v"
,
err
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment