How to properly configure types proxy for optimal performance? or What are the best practices to conf

14 Replies, 1175 Views

Dude, Vercel’s rewrites are a game-changer if you’re deploying there. No need to manually configure types proxy—just drop this in `vercel.json`:

```json
{
"rewrites": [{ "source": "/api/(.*)", "destination": "https://your-api.com/$1" }]
}
```

Otherwise, http-proxy is your friend. Just don’t forget to handle errors—it’ll crash your app otherwise.

Messages In This Thread



Users browsing this thread: 1 Guest(s)