Home / Function/ Test_CORS_MaxAge_NotSetOnSimpleRequest() — fiber Function Reference

Test_CORS_MaxAge_NotSetOnSimpleRequest() — fiber Function Reference

Architecture documentation for the Test_CORS_MaxAge_NotSetOnSimpleRequest() function in cors_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  06fcc798_e266_bd77_590e_1c66cc308015["Test_CORS_MaxAge_NotSetOnSimpleRequest()"]
  e59a43fd_cfa4_0f6b_1938_4a08e36ad74e["cors_test.go"]
  06fcc798_e266_bd77_590e_1c66cc308015 -->|defined in| e59a43fd_cfa4_0f6b_1938_4a08e36ad74e
  style 06fcc798_e266_bd77_590e_1c66cc308015 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/cors/cors_test.go lines 73–85

func Test_CORS_MaxAge_NotSetOnSimpleRequest(t *testing.T) {
	t.Parallel()

	app := fiber.New()
	app.Use(New(Config{MaxAge: 100}))

	ctx := &fasthttp.RequestCtx{}
	ctx.Request.Header.SetMethod(fiber.MethodGet)
	ctx.Request.Header.Set(fiber.HeaderOrigin, "http://localhost")
	app.Handler()(ctx)

	require.Empty(t, string(ctx.Response.Header.Peek(fiber.HeaderAccessControlMaxAge)))
}

Domain

Subdomains

Frequently Asked Questions

What does Test_CORS_MaxAge_NotSetOnSimpleRequest() do?
Test_CORS_MaxAge_NotSetOnSimpleRequest() is a function in the fiber codebase, defined in middleware/cors/cors_test.go.
Where is Test_CORS_MaxAge_NotSetOnSimpleRequest() defined?
Test_CORS_MaxAge_NotSetOnSimpleRequest() is defined in middleware/cors/cors_test.go at line 73.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free