# Content Middleware

Canonical URL: https://babadook.tech/modules/content-middleware
Entity: modules
Content hash: ae5d1cf1c012661c25db63a2c4881f9c2f0090320703b67943300955d239f753

Content transformation pipeline with 10 middleware types for access control, format conversion, personalization injection, cache optimization, and A/B variant selection.

Content transformation pipeline with 10 middleware types for access control, format conversion, personalization injection, cache optimization, and A/B variant selection.

## transform-content-in-flight

Transform Content in Flight Content Middleware sits between the content store and the delivery API. Each middleware in the pipeline can transform, filter, enrich, or gate content before it reaches the consumer. Chain middlewares to build complex content delivery logic without touching application code. Built-in middlewares include access control (role-based content visibility), format conversion (Markdown → HTML, JSON → XML), personalization injection (merge user context into content), cache optimization (vary by user segment, locale, device), and A/B variant selection (serve experiment variants).

### data Viz

## Content Middleware Specifications

- **Middleware Types:** 10 built-in: auth, format, personalization, cache, A/B, locale, geo, device, rate-limit, transform
- **Pipeline:** Ordered middleware chain with short-circuit support
- **Custom:** TypeScript middleware SDK for custom logic
- **Performance:** <2ms overhead per middleware in chain

## features

caching: true

ab variants: true

access control: true

personalization: true

format conversion: true

## Relationships

### products

- DXP — https://babadook.tech/products/dxp

### capabilities

- High-Performance Rendering — https://babadook.tech/capabilities/high-performance-rendering

### sub modules

- Content Management — https://babadook.tech/sub-modules/content-management

### use cases

- Content Management