For Workes & Pages, what is the name of the domain?
testfunction.pages.dev/index.html
What is the issue or error you’re encountering
I’ve upload a index.html but cloudflare pages droped it to the _worker.js.
What steps have you taken to resolve the issue?
I’ve read this
the code this doc provide use return env.ASSETS.fetch(request); which will be considered as a function request. is there a way to force it to use static request via file uploading?
and a index.html in the same folder.
I don’t know how to use the wrangler cli.and prefer to solve it by file uploading.
when I upload this and it returns https://testfunction.pages.dev/index.html
I’m confused on what specifically you’re trying to do. If you don’t want to invoke a Function and just want to serve e static file, don’t upload a _worker.js, only upload the static files
By default a _worker.js will always run and be served ahead of assets. You can specify paths with _routes.json if you want to filter it down to only run in specific cases
I want to use the js as the backend, which means request by the client side script, which is static in the index.html .
can you give an example? to exclude the index.html from the list that pages drop to the worker.js?
I think the _worker.js can only be placed under the / folder, am I correct, If so,. my index.html also needs to be place under the root.