Proxying browser exceptions through backend

Hi guys,

I’m looking for a good way to proxy Javascript browser exceptions through the backend and onto the Sentry cloud service.

The use-case is that I provide a Vue-based widget that our clients put on their own websites which then communicates with our backend server.
I could log the exceptions directly using the sentry-browser SDK but I don’t want to generate requests from clients websites going to any external domains other than our own.

Alternatively I could skip the sentry-browser SDK and just use collect the data myself, pass it it in a request to the backend, and user the PHP SDK but if I could user the browser SDK to collect and format the data then that would be nice