else if (ad.type === 'html') {
console.log("HTML Ad: ", ad);
const htmlUrl = `https://alveoplatform.com/static/${ad.asset}`; // The HTML URL is now relative to the /static directory
console.log("HTML URL: ", htmlUrl);
const response = await adWorker.fetch(`https://alveoplatform.com/static/${ad.asset}`);
const htmlContent = await response.text();
return c.text(htmlContent, { headers: { 'Content-Type': 'text/html' } });
}
else if (ad.type === 'html') {
console.log("HTML Ad: ", ad);
const htmlUrl = `https://alveoplatform.com/static/${ad.asset}`; // The HTML URL is now relative to the /static directory
console.log("HTML URL: ", htmlUrl);
const response = await adWorker.fetch(`https://alveoplatform.com/static/${ad.asset}`);
const htmlContent = await response.text();
return c.text(htmlContent, { headers: { 'Content-Type': 'text/html' } });
}