chore: eliminar archivos de configuracion Cloudflare Workers (worker.js y wrangler.toml)
This commit is contained in:
parent
c90584560d
commit
f8b1b6fd65
|
|
@ -1,16 +0,0 @@
|
||||||
export default {
|
|
||||||
async fetch(request, env, ctx) {
|
|
||||||
const url = new URL(request.url);
|
|
||||||
|
|
||||||
// Intentar servir el recurso estático desde el binding ASSETS
|
|
||||||
let response = await env.ASSETS.fetch(request);
|
|
||||||
|
|
||||||
// Soporte SPA: Si no existe (404), servir index.html para que React Router maneje la ruta
|
|
||||||
if (response.status === 404) {
|
|
||||||
const indexRequest = new Request(new URL("/index.html", request.url), request);
|
|
||||||
response = await env.ASSETS.fetch(indexRequest);
|
|
||||||
}
|
|
||||||
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
name = "repairit"
|
|
||||||
main = "worker.js"
|
|
||||||
compatibility_date = "2026-06-09"
|
|
||||||
|
|
||||||
[assets]
|
|
||||||
directory = "./dist"
|
|
||||||
binding = "ASSETS"
|
|
||||||
Loading…
Reference in New Issue
Block a user