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
8a2d5b05
Commit
8a2d5b05
authored
Feb 07, 2025
by
qiuqunfeng
Browse files
commit
parent
b6a83272
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
internal/service/waf.go
internal/service/waf.go
+2
-1
No files found.
internal/service/waf.go
View file @
8a2d5b05
...
...
@@ -67,7 +67,8 @@ func (s *wafService) CreateWaf(ctx context.Context, req *CreateWafReq) (*Waf, er
// Determine which rule categories to enable
var
enabledCategories
[]
model
.
WafRuleCategory
if
len
(
wafService
.
RuleCategoryStatus
.
CategoryID
)
>
0
{
if
wafService
.
RuleCategoryStatus
!=
nil
&&
len
(
wafService
.
RuleCategoryStatus
.
CategoryID
)
>
0
{
// Only include categories not already enabled
for
_
,
category
:=
range
ruleCategories
{
if
!
slices
.
Contains
(
wafService
.
RuleCategoryStatus
.
CategoryID
,
category
.
CategoryID
)
{
...
...
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