Im developing a worker as a middleman api using wrangler 2.x. To protect the middleman from unwanted requests, it checks requests against a whitelist of allowed domains.
However when using wrangler I have to manually disable this whitelist check with a flag, as adding urls to my whitelist that wrangler listens on (
Listening at http://0.0.0.0:8787 or the worker’s own url
https://<YOUR-WORKER>.<YOUR-ACCOUNT>.workers.dev) doesn’t work the response object returned by fetch
Is there another means to check if requests are coming via wrangler, or programmatically check if the script if being run in a wrangler context?