---
title: "CORS for webhooks | WebhookRelay"
meta:
  "og:description": "Configure CORS for your webhooks to allow requests from other domains."
  "og:title": "CORS for webhooks"
  description: "Configure CORS for your webhooks to allow requests from other domains."
---

![Stripes](https://webhookrelay.com/docs/webhooks/cors/images/stripes.svg)

Documentation

**Fundamentals**

# **CORS for webhooks**

Configure CORS for your webhooks to allow requests from other domains.

## [What is CORS?](#what-is-cors)

CORS is a security feature that allows web applications to make requests to a different domain than the one that served the web page. It is a way to allow web applications to access resources from different domains.

## [How to configure CORS for your webhooks](#how-to-configure-cors-for-your-webhooks)

Go to your bucket details and click on "Response Configuration" next to the input:

![Custom Domains](https://webhookrelay.com/docs/webhooks/cors/images/docs/webhooks/cors/response-config.png)

Then, in the headers section add the following headers:

- `Access-Control-Allow-Origin: *`
- `Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS`
- `Access-Control-Allow-Headers: Content-Type, Authorization`

Then, click on "Save" button to apply the changes.

## [That's it!](#thats-it)

That's it! You can now configure CORS for your webhooks to allow requests from other domains.

## [Alternative Option - Function](#alternative-option-function)

You can also [create a function](https://my.webhookrelay.com/functions) with the following code:

```
r:SetResponseStatusCode(200)
r:SetResponseHeader("Access-Control-Allow-Origin", "*")
r:SetResponseHeader("Access-Control-Allow-Methods", "POST")
r:SetResponseHeader("Access-Control-Allow-Headers", "content-type")
```

Once created, you need to add this to your input.

Did this page help you?