Skip to main content
Version: v0.x

Attach CORS headers to requests

Proxyflare includes support for cross origin resource sharing (CORS).

Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources.


Provide your desired settings in the Route["to.cors"] field. Refer to the CORSOptions documentation for more information.

const routes = [
from: { pattern: "*" },
to: {
url: "",
cors: {
origin: true,
methods: "*",
exposedHeaders: [],
allowedHeaders: [],
credentials: true,
maxAge: 3600,

Testing CORS

There are many tools to test your CORS configuration. We recommend