CORS error on Guest API POST in Next.js SSR

Embedding the Messenger widget in a Next.js app. The client-side works fine, but the server-side fetch to /api/v2/conversations/webmessaging/sessions throws a CORS error. The request is blocked before it even leaves the server, so headers don’t matter. Tried setting Access-Control-Allow-Origin to *, but the preflight still fails. Here’s the fetch config:

await fetch('https://api.mypurecloud.com/api/v2/conversations/webmessaging/sessions', {
 method: 'POST',
 headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}` },
 body: JSON.stringify({ displayName: 'Test' })
});

Next.js doesn’t allow CORS on the server side by design. How do you handle this?