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
b6a83272
Commit
b6a83272
authored
Feb 07, 2025
by
qiuqunfeng
Browse files
commit
parent
2dc4972e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
config/manifests.yaml
config/manifests.yaml
+4
-0
internal/service/waf.go
internal/service/waf.go
+1
-1
No files found.
config/manifests.yaml
View file @
b6a83272
...
@@ -10,10 +10,14 @@ spec:
...
@@ -10,10 +10,14 @@ spec:
metadata
:
metadata
:
labels
:
labels
:
app
:
tensorsec-waf-console
app
:
tensorsec-waf-console
app.kubernetes.io/name
:
waf-console
spec
:
spec
:
imagePullSecrets
:
-
name
:
harbor-admin-secret
containers
:
containers
:
-
name
:
waf-console
-
name
:
waf-console
image
:
harbor.tensorsecurity.com/tensorsecurity/waf-console:testcn
image
:
harbor.tensorsecurity.com/tensorsecurity/waf-console:testcn
imagePullPolicy
:
Always
resources
:
resources
:
limits
:
limits
:
memory
:
"
128Mi"
memory
:
"
128Mi"
...
...
internal/service/waf.go
View file @
b6a83272
...
@@ -54,7 +54,7 @@ func (s *wafService) CreateWaf(ctx context.Context, req *CreateWafReq) (*Waf, er
...
@@ -54,7 +54,7 @@ func (s *wafService) CreateWaf(ctx context.Context, req *CreateWafReq) (*Waf, er
// Get enabled rule categories from DB
// Get enabled rule categories from DB
var
ruleCategories
[]
model
.
WafRuleCategory
var
ruleCategories
[]
model
.
WafRuleCategory
if
err
:=
s
.
db
.
Model
(
&
model
.
WafRuleCategory
{})
.
Where
(
"status = ?"
,
1
)
.
Find
(
&
ruleCategories
)
.
Error
;
err
!=
nil
{
if
err
:=
s
.
db
.
Model
(
&
model
.
WafRuleCategory
{})
.
Where
(
"status = ?"
,
0
)
.
Find
(
&
ruleCategories
)
.
Error
;
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to get rule categories: %v"
,
err
)
return
nil
,
fmt
.
Errorf
(
"failed to get rule categories: %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