Since 2026-09-19 the site bridge worker served every path from Pages, so the API server on the NAS had no public route: admin login (API_SERVER_URL) and stt-proxy (D3RO_API_URL) called https://d3ro.chanpaca.net/api/... and got the landing page's 405. - The worker passes /app, /api and /health through to the domain origin (the kd-nas tunnel) and serves everything else from Pages. - The kd-nas tunnel sends path ^/app on d3ro.chanpaca.net to the web app (NAS 3002); other paths keep going to the API (NAS 5050). No extra hostname or DNS record is needed, so WEB_APP_ORIGIN is removed. - API_PATH_PREFIXES joins WEB_APP_BASE_PATH in packages/core/src/web-urls.ts (contract regenerated). Verified live: /app/login 200, /health and /api/health 200, API login 401 for an unknown account (was 405), landing/legal/404 unchanged, git/sso/admin hosts unaffected.
20 lines
1,019 B
TOML
20 lines
1,019 B
TOML
# server/cloudflare-site-bridge/wrangler.toml
|
|
#
|
|
# d3ro.chanpaca.net 을 Cloudflare Pages 배포본(d3ro.pages.dev)에 연결하는 브리지.
|
|
#
|
|
# 왜 필요한가: Pages 커스텀 도메인은 존 DNS에 CNAME(d3ro → d3ro.pages.dev)을 요구한다.
|
|
# 기존 d3ro 레코드가 남아 있어 Pages가 레코드를 만들지 못하고("CNAME record not set")
|
|
# 도메인은 빈 404를 반환했다. DNS 편집 권한 없이 도메인을 살리기 위해, 이미 프록시된
|
|
# 호스트네임에 Workers 라우트를 걸어 Pages 배포본을 그대로 서빙한다.
|
|
#
|
|
# 정리(권장): 대시보드에서 CNAME d3ro → d3ro.pages.dev 를 추가한 뒤 이 라우트와
|
|
# 워커를 제거하면 트래픽이 Pages 커스텀 도메인으로 직접 흐른다.
|
|
# npx wrangler delete --name d3ro-site-bridge (라우트는 워커 삭제 시 함께 해제)
|
|
|
|
name = "d3ro-site-bridge"
|
|
main = "src/index.ts"
|
|
compatibility_date = "2024-04-01"
|
|
|
|
routes = [
|
|
{ pattern = "d3ro.chanpaca.net/*", zone_name = "chanpaca.net" }
|
|
]
|