Yeah, URL redirects I was going to track a QR code which uses a Cloudflare pages redirection to my m
Yeah, URL redirects I was going to track a QR code which uses a Cloudflare pages redirection to my main domain. Thanks




workerd runtime appropriately

static/* assets on pages stops working and doesn't work until I login to CF dashboard > re-deploy the project. Any suggestion will be really apprecaited.

pages.dev domain into the Pages Worker, so the hash will still match.




wrangler pages deploy <directory>import {
CfProperties,
Request,
ExecutionContext,
R2Bucket,
} from '@cloudflare/workers-types/experimental';
declare module 'h3' {
interface H3EventContext {
cf: CfProperties;
cloudflare: {
request: Request;
env: {
STORAGE_BUCKET: R2Bucket;
};
context: ExecutionContext;
};
}
}const cacheTtlByStatus = {
'200-299': 86400,
404: 5,
'500-599': 0,
};
app.get(`${WEBSITE_URL}/static/*`, async (ctx) => {
return await ctx.env.ASSETS.fetch(ctx.req.raw, {
cf: {
cacheTtlByStatus: cacheTtlByStatus,
},
});
});