For the Vite SPA, is it a static project, or does it have SSR/dynamic content?
For the Vite SPA, is it a static project, or does it have SSR/dynamic content?
Currently, mTLS for Workers cannot be used for requests made to a service that is a proxied zone on Cloudflare. If your Worker presents a client certificate to a service proxied by Cloudflare, Cloudflare will return a 520 error.
Response used mTLS?wrangler.toml:waitUntil expects a Promisevoid is fine, but you don't have anything to await there so it'll just kill the fetch

--remote mode, then yes, it shouldif (env.MY_CERT) {
globalThis.fetch = env.MY_CERT.fetch.bind(env.MY_CERT);
}export default {
async scheduled(event, env, ctx) {
ctx.waitUntil(task());
},
};
function task() {
fetch(
'https://canary.discord.com/api/webhooks/:id/:token',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
content: 'test',
}),
}
);
}name = ...
main = ...
compatibility_date = ...
[triggers]
crons = [ "* * * * *" ]