Home / Function/ hasFormLikeHeader() — astro Function Reference

hasFormLikeHeader() — astro Function Reference

Architecture documentation for the hasFormLikeHeader() function in middlewares.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  64ceb8a0_2007_575b_ef04_927e3ea9611f["hasFormLikeHeader()"]
  2708f5c4_261d_e0b9_a0f9_f2b98541fcf7["middlewares.ts"]
  64ceb8a0_2007_575b_ef04_927e3ea9611f -->|defined in| 2708f5c4_261d_e0b9_a0f9_f2b98541fcf7
  e5391f23_964b_7d27_a09a_19fb686f5ff3["createOriginCheckMiddleware()"]
  e5391f23_964b_7d27_a09a_19fb686f5ff3 -->|calls| 64ceb8a0_2007_575b_ef04_927e3ea9611f
  style 64ceb8a0_2007_575b_ef04_927e3ea9611f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/app/middlewares.ts lines 57–66

function hasFormLikeHeader(contentType: string | null): boolean {
	if (contentType) {
		for (const FORM_CONTENT_TYPE of FORM_CONTENT_TYPES) {
			if (contentType.toLowerCase().includes(FORM_CONTENT_TYPE)) {
				return true;
			}
		}
	}
	return false;
}

Domain

Subdomains

Frequently Asked Questions

What does hasFormLikeHeader() do?
hasFormLikeHeader() is a function in the astro codebase, defined in packages/astro/src/core/app/middlewares.ts.
Where is hasFormLikeHeader() defined?
hasFormLikeHeader() is defined in packages/astro/src/core/app/middlewares.ts at line 57.
What calls hasFormLikeHeader()?
hasFormLikeHeader() is called by 1 function(s): createOriginCheckMiddleware.

Analyze Your Own Codebase

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

Try Supermodel Free