Hi guys, any suggestions on blogging frameworks that works well with Pages?
Hi guys, any suggestions on blogging frameworks that works well with Pages?
We plan to bridge the gaps between Workers and Pages and provide ways to migrate your Pages projects to Workers.I guess it's happening soon
// Main request handler
export default {
async fetch(request, env) {
const url = new URL(request.url);
const secretKey = env.SECRET_KEY; // Defined in the Cloudflare Workers environment
const apiKey = env.API_KEY; // Defined in the Cloudflare Workers environment
// CORS check for allowed domains
//if (!checkCors(url.origin)) {
// return new Response('CORS check failed', { status: 403 });
//}
// Handle /v1/signature path
if (url.pathname === '/v1/signature') {
const nonce = generateNonce();
const signature = await generateHMAC(nonce, apiKey, secretKey);
return new Response(
JSON.stringify({
apiKey,
signature,
nonce,
})
//,
//{
// headers: {
// 'Content-Type': 'application/json',
// 'Access-Control-Allow-Origin': "https://connect-example-react.metalpay.com",
// 'Access-Control-Allow-Methods': 'GET, OPTIONS',
// }
//}
);
}
return env.ASSETS.fetch(request);
},
}Error: Failed to publish your Function. Got error: multipart uploads must contain a readable body_part, main_module, or assets