search for standard sites pub-search.waow.tech
search zig blog atproto
0

Configure Feed

Select the types of activity you want to include in your feed.

feat(labeler): proxy labeler.pub-search.waow.tech → fly :8443 labeler

Pages Function forwards the labeler vanity host (HTTP queryLabels + WS
subscribeLabels) to the backend's labeler service. fly routes by external port
so it can't host-route; CF (Pages custom domain) terminates TLS and this proxies.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

+13
+13
site/functions/[[path]].js
··· 308 308 309 309 // ---------- entry ---------- 310 310 311 + // the labeler is a second fly service (internal :3001, public :8443). Cloudflare 312 + // terminates TLS for labeler.pub-search.waow.tech (Pages custom domain) and this 313 + // function proxies it through — fly routes by external port, so it can't host- 314 + // route, and CF can't cheaply rewrite the origin port. Covers HTTP (queryLabels) 315 + // and WebSocket (subscribeLabels) transparently. 316 + const LABELER_HOST = 'labeler.pub-search.waow.tech'; 317 + const LABELER_ORIGIN = 'https://leaflet-search-backend.fly.dev:8443'; 318 + 311 319 export async function onRequest(context) { 312 320 const url = new URL(context.request.url); 313 321 const path = url.pathname; 322 + 323 + if (url.hostname === LABELER_HOST) { 324 + const target = LABELER_ORIGIN + path + url.search; 325 + return fetch(new Request(target, context.request)); 326 + } 314 327 315 328 if (path === '/' || path === '/index.html') { 316 329 return handleHome(context, url);