# Devproxy Setup

{% hint style="warning" %}
Currently **Sygnal DevProxy** can only be installed by Sygnal. \
[Contact us](https://www.sygnal.com/contact) if you are interested in a build for your projects.&#x20;
{% endhint %}

## Platform

* Cloudflare
  * Free account works fine

## Installation

Notes on installation into a new Cloudflare account.

```
cd webflow-dev-proxy
```

Add env to `wrangler.toml`;&#x20;

```
[env.ENV]
name = "webflow-dev-proxy"
account_id = "CLOUDFLARE_ACCOUNT_ID"
kv_namespaces = [
#  { binding = "DEVPROXY", id = "CLOUDFLARE_KV_STORE_ID" }
]
```

```
wrangler deploy --env ENV
```

In Cloudflare;

Create new KV store;

```
DEVPROXY
```

Copy ID to `wrangler.toml`

Uncomment binding

Re-deploy

Add key

## Cloudflare Config

### Account-Level Config

Workers;&#x20;

* Install `webflow-dev-proxy` worker in account

KV;&#x20;

* In `CONFIG` add the following entry;&#x20;
  * Key - e.g. `luxradiology.co.nz:devproxy`&#x20;
  * Value - e.g. -&#x20;

```
{ "version": 1, "origin": "https://lux-radiology.webflow.io/" }
```

### Site-Level Config

Navigate to the Website page for your domain in Cloudflare.&#x20;

DNS;

| Type | Name | Content   | Proxy status |
| ---- | ---- | --------- | ------------ |
| A    | dev  | 75.2.70.5 | Proxied      |
| A    | test | 75.2.70.5 | Proxied      |

### Cloudflare Worker Routes

Navigate to the Website page for your domain in Cloudflare

Click Worker Routes&#x20;

| Route                | Worker            |
| -------------------- | ----------------- |
| `*dev.mysite.com/*`  | webflow-dev-proxy |
| `*test.mysite.com/*` | webflow-dev-proxy |

### DEVPROXY

key - dev.mysite.com

value - mysite.webflow\.io&#x20;
