// Define your customizable inputs const statusCode = 503; const title = "We'll Be Right Back!"; const message = "Our site is currently undergoing scheduled maintenance. We’re working hard to bring you a better experience. Thank you for your patience and understanding."; const estimatedTime = "1 hour"; const contactEmail = "support@example.com"; const contactPhone = "+1 234 567 89"; export default { async fetch(request) { // Serve the maintenance page as a response return new Response(generateMaintenancePage(), { status: statusCode, headers: { "Content-Type": "text/html", "Retry-After": "3600", // Suggest retry after 1 hour }, }); }, }; function generateMaintenancePage() { return ` ${title}

${title}

${message}

If all goes to plan, we'll be back online in ${estimatedTime}. 🚀

Need help? Reach out to us at ${contactEmail} or call us at ${contactPhone}.

`; }