Skip to content

Commit cd30dc8

Browse files
bchapuisclaude
andcommitted
Serve app static assets without worker round-trip
Drop the SPA-fallback worker in favor of the assets binding's native single-page-application not_found_handling. Every request previously went through the worker first, which added cold-start latency that caused crawlers (e.g. Ahrefs) to time out fetching robots.txt. Also disallow indexing on app.dafthunk.com — the subdomain is the auth-gated application UI and has no public content to crawl. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent cfb1d18 commit cd30dc8

3 files changed

Lines changed: 2 additions & 34 deletions

File tree

apps/app/public/robots.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
User-agent: *
2-
Allow: /$
3-
Allow: /share/
42
Disallow: /

apps/app/worker/index.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

apps/app/wrangler.jsonc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
"$schema": "node_modules/wrangler/config-schema.json",
33
"name": "dafthunk-app",
44
"compatibility_date": "2025-11-17",
5-
"main": "./worker/index.ts",
65

7-
// Static assets configuration
6+
// Static assets configuration with native SPA fallback
87
"assets": {
98
"binding": "ASSETS",
109
"directory": "./dist",
11-
"run_worker_first": true
10+
"not_found_handling": "single-page-application"
1211
}
1312
}

0 commit comments

Comments
 (0)