Is it possible to connect to a backend canister from NextJS app hosted on Vercel?

Hi everyone - absolutely loving building on ICP, I’m currently building a decentralised version of YouTube.

My question is, I would like to use Vercel to host my front end react web app - couple reasons for this, but most importantly is their built in server side rendering, for SEO purposes.

My current setup is a front end canister for the React web app and a backend written in Motoko. But I’d like to just have one backend canister and a NextJS web app that’s hosted on Vercel.

Is there anything stopping me from hosting the front end elsewhere and connecting to the backend from there? Or is there a strict restriction on what hosts can connect to our backend canisters I.e security policy or CORS blocking?

Thanks in advance!

1 Like