wrangler-legacy icon indicating copy to clipboard operation
wrangler-legacy copied to clipboard

How to disable local cache in dev mode

Open aliuq opened this issue 1 year ago • 0 comments

🐛 Bug report

Describe the bug

Coding for a while, this url localhost:8787 is not changed by any modified, e.g. wheh I comment belows if condition, it will keep the old result.

export default {
  async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
    const url = new URL(request.url)
    console.log(url.host);
    console.log(url.hostname);
    
    // if (url.host in regs) {
    // 	url.host = regs[url.host]
    // 	url.port = '80'
    // 	return proxy(url, request)
    // }
    return new Response("Hello World!");
  },
};

Environment and versions

Fill out the following information about your environment.

  • operating system: Windows 11
  • output of wrangler -V: wrangler 2.0.23
  • output of node -v: v16.14.2
  • content of wrangler.toml:
# wrangler.toml
name = "proxy-github"
main = "src/index.ts"
compatibility_date = "2022-07-31"
workers_dev = false

aliuq avatar Jul 31 '22 12:07 aliuq