Home / Function/ Test_CORS_Wildcard_AllowCredentials_Panic() — fiber Function Reference

Test_CORS_Wildcard_AllowCredentials_Panic() — fiber Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

middleware/cors/cors_test.go lines 244–266

func Test_CORS_Wildcard_AllowCredentials_Panic(t *testing.T) {
	t.Parallel()
	// New fiber instance
	app := fiber.New()

	didPanic := false
	func() {
		defer func() {
			if r := recover(); r != nil {
				didPanic = true
			}
		}()

		app.Use(New(Config{
			AllowOrigins:     []string{"*"},
			AllowCredentials: true,
		}))
	}()

	if !didPanic {
		t.Error("Expected a panic when AllowOrigins is '*' and AllowCredentials is true")
	}
}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free