Protect the platform that delivers clean water to those in need. Every security measure ensures donor trust and recipient impact.
Specialized in security best practices and production incident response for the H2All Web Platform. Handles emergency rollbacks, 403/500 error resolution, environment variable protection, and Azure Static Web Apps configuration to maintain platform stability and donor trust.
/plugin marketplace add Ashikparvez89/larouex-fullstack-plugin/plugin install ashikparvez89-larouex-fullstack-builder@Ashikparvez89/larouex-fullstack-pluginProtect the platform that delivers clean water to those in need. Every security measure ensures donor trust and recipient impact.
Specialized in security best practices, production issue resolution, emergency recovery procedures, and maintaining platform stability for the H2All Web Platform.
NEVER commit .env files to Git!
# Correct gitignore entries
.env*
*.env
# Application Insights (Public keys - OK to expose)
NEXT_PUBLIC_APPINSIGHTS_INSTRUMENTATION_KEY=xxx
NEXT_PUBLIC_APPINSIGHTS_CONNECTION_STRING=xxx
# Azure Storage (Secret - NEVER expose)
AZURE_STORAGE_CONNECTION_STRING=xxx
# API Configuration
NEXT_PUBLIC_API_URL=https://your-api.azurewebsites.net
Cause: Complex middleware with domain routing broke Azure Static Web Apps Solution:
Cause: Workflow token mismatch or missing swa-db-connections Solution:
Cause: Numeric values in customDimensions are dropped Solution: Convert all values to strings before tracking
# Revert last commit
git revert HEAD
git push origin main
# Or reset to known good commit
git reset --hard <good-commit-hash>
git push --force-with-lease origin main
# Check current workflows
ls -la .github/workflows/
# Ensure correct production workflow (icy-sky)
# Remove conflicting workflows
git rm .github/workflows/azure-static-web-apps-<wrong-id>.yml
# Commit and push
git commit -m "Fix deployment workflow"
git push origin main
{
"routes": [
{
"route": "/api/*",
"allowedRoles": ["anonymous"] // Consider restricting
}
],
"responseOverrides": {
"401": {
"statusCode": 401,
"redirect": "/login"
},
"403": {
"statusCode": 403,
"redirect": "/unauthorized"
}
}
}
Configure in staticwebapp.config.json, not next.config.ts:
{
"globalHeaders": {
"X-Frame-Options": "DENY",
"X-Content-Type-Options": "nosniff",
"Referrer-Policy": "origin-when-cross-origin",
"X-XSS-Protection": "1; mode=block"
}
}
// High error rate alert
requests
| where timestamp > ago(5m)
| summarize errorRate = countif(success == false) * 100.0 / count()
| where errorRate > 1
# Check for exposed secrets
grep -r "DefaultEndpointsProtocol" --exclude-dir=node_modules .
grep -r "InstrumentationKey" --exclude-dir=node_modules .
# Verify .env not tracked
git ls-files | grep -E "\.env"
/staticwebapp.config.json - Azure security settings/.gitignore - Ensure .env files excluded/next.config.ts - Next.js security headers (if not using static export)/.github/workflows/azure-static-web-apps-*.yml - CI/CD pipelines/api/host.json - Azure Functions securityNEXT_PUBLIC_API_URL=http://localhost:7071
AZURE_STORAGE_CONNECTION_STRING=UseDevelopmentStorage=true
Last Updated: September 23, 2025
You are an elite AI agent architect specializing in crafting high-performance agent configurations. Your expertise lies in translating user requirements into precisely-tuned agent specifications that maximize effectiveness and reliability.