Edge proxy

The best-SEO delivery: route /blog/* on your domain to the baas render API. Crawlers see full server-rendered HTML served from your origin — no JavaScript involved. Pages arrive with title, meta description, canonical URL, and JSON-LD already in place.

Replace PK with your site's public key and adjust the base path if your blog isn't mounted at /blog.

Cloudflare Worker

Deploy with a route of yourdomain.com/blog*:

const API = 'https://api.dailysmith.com';
const PUBLIC_KEY = 'PK'; // your pk_live_… key
const BASE_PATH = '/blog';

export default {
  async fetch(request) {
    const url = new URL(request.url);
    if (!url.pathname.startsWith(BASE_PATH)) {
      return fetch(request);
    }
    const upstream = new URL(`${API}/v1/render/${PUBLIC_KEY}${url.pathname}`);
    upstream.search = url.search;
    const response = await fetch(upstream, {
      headers: { 'User-Agent': request.headers.get('User-Agent') ?? 'baas-edge' },
      cf: { cacheTtl: 300, cacheEverything: true }
    });
    return new Response(response.body, {
      status: response.status,
      headers: response.headers
    });
  }
};

Vercel

vercel.json:

{
  "rewrites": [
    { "source": "/blog", "destination": "https://api.dailysmith.com/v1/render/PK/blog" },
    { "source": "/blog/:path*", "destination": "https://api.dailysmith.com/v1/render/PK/blog/:path*" }
  ]
}

Netlify

_redirects:

/blog        https://api.dailysmith.com/v1/render/PK/blog        200
/blog/*      https://api.dailysmith.com/v1/render/PK/blog/:splat 200

nginx

location /blog {
    proxy_pass https://api.dailysmith.com/v1/render/PK/blog;
    proxy_set_header Host api.dailysmith.com;
    proxy_ssl_server_name on;
}

Caddy

handle_path /blog* {
    rewrite * /v1/render/PK/blog{uri}
    reverse_proxy https://api.dailysmith.com
}

Notes

  • The render API resolves your blog by the path as it appears on your site, so the same URLs work across proxy, SDK, and prerender — switch or combine integrations without breaking links.
  • Responses carry strong ETags and CDN-friendly cache headers; your edge can cache them safely. Publishing a post or changing the theme changes the ETag.
  • Styling: pages ship with a readable default and your theme palette. Your own stylesheet can override anything — the content is plain HTML under classes like .baas-post.
enro