writeSkewProtectionConfig() — astro Function Reference
Architecture documentation for the writeSkewProtectionConfig() function in index.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 2fc85e65_a682_3fc0_37e4_1db04ca4c873["writeSkewProtectionConfig()"] 01c2fa75_d554_caf7_1c43_205032b5e695["index.ts"] 2fc85e65_a682_3fc0_37e4_1db04ca4c873 -->|defined in| 01c2fa75_d554_caf7_1c43_205032b5e695 0524ca9e_035f_83b7_32b4_4d658f83f56c["netlifyIntegration()"] 0524ca9e_035f_83b7_32b4_4d658f83f56c -->|calls| 2fc85e65_a682_3fc0_37e4_1db04ca4c873 style 2fc85e65_a682_3fc0_37e4_1db04ca4c873 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/netlify/src/index.ts lines 173–191
async function writeSkewProtectionConfig(config: AstroConfig) {
const deployId = process.env.DEPLOY_ID;
if (!deployId) {
return; // Skip if not deploying to Netlify
}
const deployConfigDir = new URL('.netlify/v1/', config.root);
await mkdir(deployConfigDir, { recursive: true });
await writeFile(
new URL('./skew-protection.json', deployConfigDir),
JSON.stringify({
patterns: ['/_actions/.*', '/_server-islands/.*', '.*\\.(html)$'],
sources: [
{ type: 'header', name: 'X-Netlify-Deploy-ID' },
{ type: 'query', name: 'dpl' },
],
}),
);
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does writeSkewProtectionConfig() do?
writeSkewProtectionConfig() is a function in the astro codebase, defined in packages/integrations/netlify/src/index.ts.
Where is writeSkewProtectionConfig() defined?
writeSkewProtectionConfig() is defined in packages/integrations/netlify/src/index.ts at line 173.
What calls writeSkewProtectionConfig()?
writeSkewProtectionConfig() is called by 1 function(s): netlifyIntegration.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free