Workers for uploading file to R2 throwing CORS error

I’m trying to replicate the worker script from the official docs here:

(My workers script is exactly the same as the example)

I managed to get it runs locally using postman for all the methods (GET, PUT, DELETE), but after I deploy the workers and try the endpoint to PUT (Upload) file from my frontend using axios.put it throws CORS error:
Access to XMLHttpRequest at '' from origin 'http://localhost:3000' 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.

My upload function:
axios.put("", file, { "X-Custom-Auth-Key": "MY_AUTH_KEY" })

I tried to implement CORS header proxy from this example but I still no luck & getting the same CORS error.

Can anyone help me with this CORS problem?