Headless 360Beginnermiddlewareapi-gateway
What is an API gateway or middleware in headless architecture?
Real World Scenario
The React site should not call ten different Salesforce endpoints directly from the browser. You introduce middleware.
Expected Answer
• Middleware sits between frontend and Salesforce to aggregate, transform, and secure calls
• It hides secrets, applies caching, and simplifies APIs for the UI team
• Common choices: MuleSoft, Heroku, AWS Lambda, or Node services
• Centralized logging and rate limiting live in middleware
• Reduces CORS complexity and exposes a stable contract to frontend developers
Follow-Up Questions & Answers
Click to expand — each follow-up includes a direct, interview-ready answer
Possible for some public catalog reads with guest tokens, but authenticated flows usually need a backend to protect secrets and enforce rules.
Architect Perspective
Draw three boxes: UI → middleware → Salesforce. Most headless diagrams start there.