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
334b7c50
Commit
334b7c50
authored
Feb 18, 2025
by
qiuqunfeng
Browse files
commit
parent
79eb9e9e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
internal/service/waf.go
internal/service/waf.go
+9
-1
No files found.
internal/service/waf.go
View file @
334b7c50
...
@@ -3,6 +3,7 @@ package service
...
@@ -3,6 +3,7 @@ package service
import
(
import
(
"bytes"
"bytes"
"context"
"context"
"crypto/tls"
"encoding/json"
"encoding/json"
"fmt"
"fmt"
"io"
"io"
...
@@ -529,7 +530,14 @@ func (s *wafService) ListListenerFromApiGateway(ctx context.Context, apiGatewayC
...
@@ -529,7 +530,14 @@ func (s *wafService) ListListenerFromApiGateway(ctx context.Context, apiGatewayC
return
nil
,
fmt
.
Errorf
(
"failed to create request: %v"
,
err
)
return
nil
,
fmt
.
Errorf
(
"failed to create request: %v"
,
err
)
}
}
request
.
Header
.
Set
(
"Cookie"
,
cookie
)
request
.
Header
.
Set
(
"Cookie"
,
cookie
)
resp
,
err
:=
http
.
DefaultClient
.
Do
(
request
)
// Create custom transport with TLS config
tr
:=
&
http
.
Transport
{
TLSClientConfig
:
&
tls
.
Config
{
InsecureSkipVerify
:
true
,
// Skip certificate verification for test environment
},
}
client
:=
&
http
.
Client
{
Transport
:
tr
}
resp
,
err
:=
client
.
Do
(
request
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to get listener list: %v"
,
err
)
return
nil
,
fmt
.
Errorf
(
"failed to get listener list: %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