---
title: Answer CORS OPTIONS preflight requests at the edge
summary: Browsers send OPTIONS requests before performing cross-origin POSTs. You can answer these requests directly from the edge.
url: https://www.fastly.com/documentation/solutions/examples/cors-options-preflights-at-the-edge
---

Browsers send OPTIONS requests before performing cross-origin POSTs. You can answer these requests directly from the edge.

## VCL

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/d29a4668)

## Compute

### Rust

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/67048498)

### Javascript

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/dfc6be04)

### Go

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/ba3abbd3)

