Test_Proxy_Forward_WithTlsConfig_To_Http() — fiber Function Reference
Architecture documentation for the Test_Proxy_Forward_WithTlsConfig_To_Http() function in proxy_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 1ed2ba74_c0c9_7000_c257_9fd2e512f21f["Test_Proxy_Forward_WithTlsConfig_To_Http()"] a7c70172_e40a_6ad6_65b6_b8f508cfb0a2["proxy_test.go"] 1ed2ba74_c0c9_7000_c257_9fd2e512f21f -->|defined in| a7c70172_e40a_6ad6_65b6_b8f508cfb0a2 52270b9b_26c8_081b_5239_bee723ca512a["createProxyTestServerIPv4()"] 1ed2ba74_c0c9_7000_c257_9fd2e512f21f -->|calls| 52270b9b_26c8_081b_5239_bee723ca512a fc2b6784_0dfb_d6e2_4148_406d442e8019["startServer()"] 1ed2ba74_c0c9_7000_c257_9fd2e512f21f -->|calls| fc2b6784_0dfb_d6e2_4148_406d442e8019 style 1ed2ba74_c0c9_7000_c257_9fd2e512f21f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/proxy/proxy_test.go lines 281–310
func Test_Proxy_Forward_WithTlsConfig_To_Http(t *testing.T) {
t.Parallel()
_, targetAddr := createProxyTestServerIPv4(t, func(c fiber.Ctx) error {
return c.SendString("hello from target")
})
proxyServerTLSConf, _, err := tlstest.GetTLSConfigs()
require.NoError(t, err)
proxyServerLn, err := net.Listen(fiber.NetworkTCP4, "127.0.0.1:0")
require.NoError(t, err)
proxyServerLn = tls.NewListener(proxyServerLn, proxyServerTLSConf)
proxyAddr := proxyServerLn.Addr().String()
app := fiber.New()
app.Use(Forward("http://" + targetAddr))
startServer(app, proxyServerLn)
client := clientpkg.New()
client.SetTimeout(5 * time.Second)
client.TLSConfig().InsecureSkipVerify = true
resp, err := client.Get("https://" + proxyAddr)
require.NoError(t, err)
require.Equal(t, fiber.StatusOK, resp.StatusCode())
require.Equal(t, "hello from target", string(resp.Body()))
resp.Close()
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Test_Proxy_Forward_WithTlsConfig_To_Http() do?
Test_Proxy_Forward_WithTlsConfig_To_Http() is a function in the fiber codebase, defined in middleware/proxy/proxy_test.go.
Where is Test_Proxy_Forward_WithTlsConfig_To_Http() defined?
Test_Proxy_Forward_WithTlsConfig_To_Http() is defined in middleware/proxy/proxy_test.go at line 281.
What does Test_Proxy_Forward_WithTlsConfig_To_Http() call?
Test_Proxy_Forward_WithTlsConfig_To_Http() calls 2 function(s): createProxyTestServerIPv4, startServer.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free