{# canonical_base is the OWNING tenant's origin: all 16 Peasy domains serve the same catalogue, so a page rendered by a non-owner points its canonical at the owner instead of competing with it. Falls back to this site for static/self-owned pages. #}
🍋
Menu
Security

WAF

Web Application Firewall

A security layer that filters HTTP traffic between a web application and the internet, blocking common attacks like SQL injection and XSS.

तकनीकी विवरण

WAF attacks exploit the browser's trust in page content. Stored XSS persists in the database (most dangerous). Reflected XSS appears in URL parameters. DOM-based XSS occurs entirely in client-side JavaScript. Defenses: output encoding (HTML entities, JavaScript escaping), Content Security Policy (CSP) headers, HttpOnly cookies (preventing JavaScript access), and framework auto-escaping (React, Django, Angular). The primary rule: never insert untrusted data into HTML without context-appropriate escaping.

उदाहरण

```javascript
// WAF — Web Crypto API example
const data = new TextEncoder().encode('sensitive data');
const hash = await crypto.subtle.digest('SHA-256', data);
const hex = Array.from(new Uint8Array(hash))
  .map(b => b.toString(16).padStart(2, '0')).join('');
```

संबंधित फ़ॉर्मेट

संबंधित टूल्स

संबंधित शब्द