It needs to be exported from the entrypoint of the Worker
It needs to be exported from the entrypoint of the Worker
routeDORequest. If you use it, the DO will automatically get the headers on each request or WebSocket upgrade. You'll still have to pluck them out of the headers and stick them in storage. If you want to see how I do it, look at the source code here.