Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/fabioc-aloha/Alex_Skill_Mall --skill azure-swa-gotchas명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Create or improve a Markdown instruction, skill, prompt, or agent from an explicitly selected file or user-identified text. Use when a user asks to optimize an existing brain artifact or create one for consistent future execution.
Clear documentation through visual excellence
Assess active Markdown brain files in a local AI agent project or plugin source without changing it. Use before modifying a brain or reviewing declared instructions, skills, prompts, agents, bundled Markdown resources, and research documentation.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | azure-swa-gotchas |
| description | Time saved: 2-4 hours per issue |
| lastReviewed | 2026-04-30T00:00:00.000Z |
Time saved: 2-4 hours per issue
Azure Static Web Apps is powerful but has numerous edge cases that cause silent failures or confusing behavior. The documentation covers the happy path; these are the unhappy paths.
Symptom: Login callbacks return 401 → infinite redirect loop
Cause: /.auth/* routes must be explicitly allowed for anonymous BEFORE any /* wildcard with authenticated.
Solution:
{
"routes": [
{ "route": "/.auth/*", "allowedRoles": ["anonymous"] },
{ "route": "/*", "allowedRoles": ["authenticated"] }
]
}
Time saved: 1-2 hours
Symptom: Your linked Function App returns 404, but embedded Functions work
Cause: If the workflow has api_location:, SWA deploys embedded Functions which override any linked backend.
Solution: Remove api_location from workflow to route to the linked Function App.
# Remove this line:
# api_location: "api"
Time saved: 1-2 hours
Symptom: CLI reports success but nothing uploads
Cause: Known bug in v2.0.8
Solution: Use GitHub Actions (Azure/static-web-apps-deploy@v1) instead.
- uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "/"
output_location: "dist"
Time saved: 30-60 min
Symptom: Auth works on default hostname, fails on custom domain
Cause: Entra ID app registration must include callback URIs for BOTH the default SWA hostname AND any custom domain.
Solution: Add both to app registration:
https://yourapp.azurestaticapps.net/.auth/login/aad/callbackhttps://yourdomain.com/.auth/login/aad/callbackTime saved: 30-60 min
Symptom: ManagedIdentityCredential fails in embedded Functions
Cause: Embedded Functions don't have the managed identity environment variables.
Solution: Create a standalone Function App with system-assigned managed identity, link via az staticwebapp backends link.
az staticwebapp backends link \
--name my-swa \
--resource-group my-rg \
--backend-resource-id /subscriptions/.../Microsoft.Web/sites/my-func-app \
--backend-region eastus
Time saved: 2-3 hours
Symptom: SWA content won't load in an iframe
Cause: Default X-Frame-Options is DENY.
Solution: Set SAMEORIGIN in staticwebapp.config.json:
{
"globalHeaders": {
"X-Frame-Options": "SAMEORIGIN"
}
}
Time saved: 30 min
Symptom: New file in public/ doesn't appear on site
Cause: Files in public/ are copied to dist/ during build. Committing doesn't serve them.
Solution: Rebuild and redeploy:
npm run build
# Then trigger deployment
Time saved: 30 min
Symptom: Deployment conflicts or stale content
Cause: Previous deployment source still linked
Solution: Disconnect before moving to CLI or new workflow:
az staticwebapp disconnect --name my-swa
Time saved: 30 min
Symptom: Functions silently fail to deploy
Cause: package.json must have "main" pointing to the file that registers functions via app.http().
Solution:
{
"main": "dist/index.js"
}
Where index.js contains:
const { app } = require('@azure/functions');
app.http('myFunction', { ... });
Time saved: 1-2 hours
Symptom: Using wrong hostname in configuration
Cause: SWA hostnames can change, especially after region changes
Solution: Always verify:
az staticwebapp show --name my-swa --query defaultHostname -o tsv
Time saved: 15 min
Symptom: CDN scripts blocked, CSP violations
Cause: Enterprise environments block external CDNs, tracking prevention enabled
Solution: Self-host all JavaScript libraries in your public/ folder.
Time saved: 1-2 hours + avoids security review
Symptom: Long API calls silently drop
Cause: Browsers may kill connections without explicit timeout
Solution:
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 180000); // 3 min
try {
const response = await fetch(url, { signal: controller.signal });
// ...
} finally {
clearTimeout(timeoutId);
}
Time saved: 1-2 hours debugging "random" failures
entra-redirect-uris — More auth gotchasvite-public-rebuild — Build system details