You will learn to extend NGINX's capabilities by embedding Lua scripts directly into your configuration. Using OpenResty, you'll dynamically manipulate requests and responses, build custom API logic, and implement advanced features like shared memory caching and background tasks.
Overview
Syllabus
- Unit 1: Getting Started with Lua
- Launch Your First Lua Endpoint
- Capturing Request Information
- Building Your First Access Guard
- Tracking Request Performance
- Building a Complete Protected Endpoint
- Unit 2: Manipulating Requests and Responses
- Building a Header Inspector Endpoint
- Enriching Requests with Custom Headers
- Building an Authentication Gateway
- Debugging Request Routing Logic
- Building a Device Aware Router
- Unit 3: Building APIs with Lua
- Protect Your API from Missing Data
- Crash Proof Your API Endpoint
- Retrieve Individual API Resources
- Direct Traffic in Your API
- Extract IDs from URL Paths
- Unit 4: Advanced OpenResty Features
- Fix the Broken Rate Limiter
- Complete Your Cache Layer
- Complete the Caching Mechanism
- Fix the Rate Limit Response