Skip to content

try-veil/veil

Repository files navigation

Veil - Opinionated Caddy Module

Veil is a Caddy module that provides API management capabilities, including subscription-based access control and request validation. It acts as a middleware that validates API requests based on subscription levels and required headers.

Demo

Below is a small recording of the terminal we onboard the Dummy JSON API and put it behind veil.

Veil Demo

Features

  • Subscription-based access control
  • Request header validation
  • API usage statistics tracking
  • Dynamic API onboarding
  • SQLite database storage

Local Setup

  1. Clone the project
  2. Veil depends on go, xcaddy, and whatever platform specific C compilation tools you'll need to compile with CGO_ENABLED=1. 2.1 Setup scripts have been provided for some platforms - macOS
  3. The Makefile has the commands required for you to get around to working with Veil.

For a detailed setup guide please refer setup docs

Configuration

Caddyfile Syntax

Refer the base Caddyfile for the config around registering Veil at port 2020.

Configuration Options

  • db_path: Path to the SQLite database file (default: "veil.db")

Reference

License

MIT License