Integrating iocaine with reverse proxies
Last updated: 2025-11-14

# Preface

`iocaine` is not a reverse proxy. It cannot, and will not serve your original content for legit visitors. It is not meant to be put in front of a reverse proxy. It’s meant to be behind one, to act as a kind of middleware. Doing so, at the moment, can be a bit complicated, but work is underway to make that easier. Meanwhile, you’ll find documentation on that help you integrate `iocaine` into your reverse proxy of choice.

But before you start reading, lets have a look at the interface `iocaine` provides! All of the integrations will have to fit into this framework, after all!

# Overview

There are currently two ways `iocaine` can interface with a reverse proxy: through a `http-server`, or through a `haproxy-spoa-server`. The latter will be discussed in its own guide, we’re focusing on the former - `http-server` - here.

The way the HTTP interface works, is that your reverse proxy sends the incoming request to `iocaine`, and `iocaine` will either respond with a HTTP 421 Misdirected Reqeust to signal the reverse proxy that it should serve the real contents, or with any other response that the reverse proxy should serve as is.

# The Guides

- Fronting iocaine with Caddy
- Fronting iocaine with nginx
- Using iocaine with HAProxy
- Using iocaine as a Traefik middleware