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
2e951857
Commit
2e951857
authored
Feb 05, 2025
by
qiuqunfeng
Browse files
fix
parent
1bea5ab0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
internal/controller/waf.go
internal/controller/waf.go
+19
-1
No files found.
internal/controller/waf.go
View file @
2e951857
...
@@ -48,7 +48,25 @@ func (c *WafController) CreateWaf(ctx *gin.Context) {
...
@@ -48,7 +48,25 @@ func (c *WafController) CreateWaf(ctx *gin.Context) {
return
return
}
}
for
_
,
r
:=
range
req
{
for
_
,
r
:=
range
req
{
c
.
service
.
CreateWaf
(
ctx1
,
&
r
)
_
,
err
:=
c
.
service
.
CreateWaf
(
ctx1
,
&
r
)
if
err
!=
nil
{
utils
.
AssembleResponse
(
ctx
,
nil
,
err
)
return
}
}
}
utils
.
AssembleResponse
(
ctx
,
nil
,
nil
)
utils
.
AssembleResponse
(
ctx
,
nil
,
nil
)
}
}
// `
// curl -X POST http://127.0.0.1:8080/v1/api/waf \
// -H "Content-Type: application/json" \
// -d '[
// {
// "region_code": "cn-east-1",
// "gatewayname": "istio-ingressgateway",
// "namespace": "istio-system",
// "port": 80,
// "host": ["*"]
// }
// ]'
// `
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