---
title: CAPTCHA at the edge
summary: null
url: https://www.fastly.com/documentation/solutions/demos/captcha
---

## What's going on here?

This is a Rust app running on Fastly Compute that generates a [CAPTCHA](https://en.wikipedia.org/wiki/CAPTCHA) and saves a signed token in a cookie which is used to verify the CAPTCHA when it is resolved.  If the user enters an incorrect string, they will be presented with a new CAPTCHA to solve.  Once the challenge is successfully solved the screen will refresh after 4s.

When you initially load the site, it serves an HTML and JavaScript web app that is statically delivered from the edge. The client web app makes calls to various endpoints at the edge and these endpoints each have a route within the Rust app that serves the request without the overhead of maintaining an origin server.
