Can we send request to worker from different domain

I tried sending the request to worker using wokrer URL from different domain and getting below error :

Access to XMLHttpRequest at ‘wokrer-url’ from origin ‘null’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

You need to add the appropriate CORS headers within your Worker’s response, and handle OPTIONS pre-flight requests.

CORS header proxy · Cloudflare Workers docs has an example of how to do this.