Skip to content

Commit 0f1d681

Browse files
one host: the custom domain, not Cloudflare's dev endpoint
pub-*.r2.dev is the development endpoint -- rate-limited, not intended for production, and switchable off in the bucket settings. The manifest has named storage.functionstr.com as base_url all along, so the page loaded from one host and then silently moved to the other the moment the runtime fetch landed. Now both are the custom domain. CORS is live for tools.functionstore.xyz, so that fetch is no longer a no-op: it upgrades the buttons from the latest/ alias to the release the manifest pins, and keeps /get/'s picker current between deploys. The comments saying it was blocked are updated -- they describe the old world. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 5e6057d commit 0f1d681

4 files changed

Lines changed: 24 additions & 20 deletions

File tree

.github/workflows/website.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
continue-on-error: true
9595
run: |
9696
live=$(curl -sf --max-time 15 -A 'fnstools-ci' \
97-
https://pub-8001b4bd92174be7a4544571b53f23da.r2.dev/fnstools/manifest.json \
97+
https://storage.functionstr.com/fnstools/manifest.json \
9898
| node -e "let s='';process.stdin.on('data',d=>s+=d).on('end',()=>{try{console.log(JSON.parse(s).release||'')}catch{console.log('')}})")
9999
site=$(grep -o 'fnstools/v[^/]*/' index.html | head -1 | sed 's|fnstools/||; s|/$||')
100100
if [ -n "$live" ] && [ -n "$site" ] && [ "$live" != "$site" ]; then

website/README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,16 @@ manifest *at paste time* from inside TouchDesigner via `requests`, and
217217
resolves every artifact and hash from that. A `/get/` page built months ago
218218
still installs the current release; only the picker's package list can lag.
219219

220-
The page also tries to refresh hrefs at runtime, but **that fetch is
221-
blocked**: neither the r2.dev bucket nor `storage.functionstr.com` sends an
222-
`Access-Control-Allow-Origin` header. Enabling CORS would let the browser
223-
upgrade hrefs from `latest/` to the pinned release, and would keep the
224-
picker's list current between deploys.
220+
The page also refreshes hrefs at runtime, and **that fetch now works**: the
221+
bucket sends `Access-Control-Allow-Origin` for `tools.functionstore.xyz`.
222+
The browser upgrades hrefs from `latest/` to the pinned release, so
223+
visitors get reproducible URLs, and `/get/`'s picker list stays current
224+
between deploys. If the fetch ever fails the static `latest/` hrefs still
225+
resolve.
226+
227+
Everything is served from the custom domain `storage.functionstr.com`, not
228+
the `pub-*.r2.dev` development endpoint — the latter is rate-limited, not
229+
intended for production, and can be switched off in the bucket settings.
225230

226231
The bootstrap artifact is `FNSTools.tox`, renamed from
227232
`FunctionStore_tools_2025.tox` in the v3.0.0 redesign. The filename is a

website/index.html

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@
349349
<a href="#credits">Credits</a>
350350
<a href="https://patreon.com/function_store" target="_blank" rel="noopener">Patreon</a>
351351
<a class="btn btn-secondary" href="https://github.com/function-store/FunctionStore_tools" target="_blank" rel="noopener">GitHub</a>
352-
<a class="btn btn-primary js-fns-download" href="https://pub-8001b4bd92174be7a4544571b53f23da.r2.dev/fnstools/latest/FNSTools.tox" download>Get FNSTools →</a>
352+
<a class="btn btn-primary js-fns-download" href="https://storage.functionstr.com/fnstools/latest/FNSTools.tox" download>Get FNSTools →</a>
353353
</nav>
354354
</div>
355355
</header>
@@ -364,7 +364,7 @@ <h1 class="hero-title">TouchDesigner,<br />minus the busywork.</h1>
364364
Take the whole toolkit or pick the three tools you actually want.
365365
</p>
366366
<div class="hero-cta">
367-
<a class="btn btn-primary btn-lg js-fns-download" href="https://pub-8001b4bd92174be7a4544571b53f23da.r2.dev/fnstools/latest/FNSTools.tox" download>Get FNSTools →</a>
367+
<a class="btn btn-primary btn-lg js-fns-download" href="https://storage.functionstr.com/fnstools/latest/FNSTools.tox" download>Get FNSTools →</a>
368368
<a class="btn btn-secondary btn-lg" href="/docs/">Read the docs</a>
369369
</div>
370370
<ul class="hero-meta">
@@ -402,8 +402,8 @@ <h3>Drop one <code>.tox</code></h3>
402402
arrives empty — it carries the installer, the updater and nothing else yet.
403403
The container you drop <em>is</em> the install target.
404404
</p>
405-
<a class="btn btn-primary js-fns-download" href="https://pub-8001b4bd92174be7a4544571b53f23da.r2.dev/fnstools/latest/FNSTools.tox" download>Download</a>
406-
<p class="path-note">Already have a toolkit container? Grab the <a class="js-fns-installer" href="https://pub-8001b4bd92174be7a4544571b53f23da.r2.dev/fnstools/latest/FNS_Installer.tox" download>bare installer</a> instead (~14 KB).</p>
405+
<a class="btn btn-primary js-fns-download" href="https://storage.functionstr.com/fnstools/latest/FNSTools.tox" download>Download</a>
406+
<p class="path-note">Already have a toolkit container? Grab the <a class="js-fns-installer" href="https://storage.functionstr.com/fnstools/latest/FNS_Installer.tox" download>bare installer</a> instead (~14 KB).</p>
407407
<p class="path-note">No download at all: <a href="/get/">pick your tools online</a> and paste one line into the Textport — it fetches and verifies everything itself.</p>
408408
</div>
409409
<div class="path">
@@ -861,7 +861,7 @@ <h2 style="font-size: clamp(28px, 3.6vw, 36px); font-weight: 700; letter-spacing
861861
One <code>.tox</code>, then pick what you need. It is free, and it takes about a minute.
862862
</p>
863863
<div class="hero-cta">
864-
<a class="btn btn-primary btn-lg js-fns-download" href="https://pub-8001b4bd92174be7a4544571b53f23da.r2.dev/fnstools/latest/FNSTools.tox" download>Get FNSTools →</a>
864+
<a class="btn btn-primary btn-lg js-fns-download" href="https://storage.functionstr.com/fnstools/latest/FNSTools.tox" download>Get FNSTools →</a>
865865
<a class="btn btn-secondary btn-lg" href="/docs/">Read the docs</a>
866866
</div>
867867
</div>
@@ -883,14 +883,13 @@ <h2 style="font-size: clamp(28px, 3.6vw, 36px); font-weight: 700; letter-spacing
883883
</footer>
884884

885885
<script>
886-
// Keep the download buttons pointed at the newest published release.
886+
// Upgrade the download buttons from latest/ to the pinned release.
887887
//
888-
// This is a bonus pass, not the mechanism: the build already stamped the
889-
// release into these hrefs. The r2.dev bucket currently serves no
890-
// Access-Control-Allow-Origin header, so this fetch is blocked by the
891-
// browser and quietly does nothing — enabling CORS on the bucket would
892-
// make the page self-refresh between deploys. Either way the static hrefs
893-
// point at a release that exists.
888+
// The bucket sends Access-Control-Allow-Origin for this site, so this
889+
// fetch succeeds and visitors get reproducible URLs -- the exact bytes
890+
// the manifest names, rather than an alias that moves under them. It is
891+
// an upgrade, not the mechanism: if it ever fails the static hrefs below
892+
// still resolve, because latest/ is always a release that exists.
894893
//
895894
// The static hrefs point at latest/, the mutable human aliases upload.py
896895
// publishes beside each release -- so a release never leaves the download
@@ -899,7 +898,7 @@ <h2 style="font-size: clamp(28px, 3.6vw, 36px); font-weight: 700; letter-spacing
899898
// every href to the release the manifest names, which is the reproducible
900899
// URL. Until the bucket sends CORS the static latest/ href is what serves.
901900
(function () {
902-
var BASE = 'https://pub-8001b4bd92174be7a4544571b53f23da.r2.dev/fnstools';
901+
var BASE = 'https://storage.functionstr.com/fnstools';
903902
var BOOTSTRAP = 'FNSTools.tox';
904903
var INSTALLER = 'FNS_Installer.tox';
905904

website/tools/build-site.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const OUT = path.join(WEB, 'docs');
3030
const SITE = 'https://tools.functionstore.xyz';
3131
const GH = 'https://github.com/function-store/FunctionStore_tools';
3232
// Rolling pointer published by packaging/publish.py; base_url in manifest.json.
33-
const BUCKET = 'https://pub-8001b4bd92174be7a4544571b53f23da.r2.dev/fnstools';
33+
const BUCKET = 'https://storage.functionstr.com/fnstools';
3434
const EDIT_BASE = `${GH}/blob/main/packaging/docs`;
3535

3636
const problems = [];

0 commit comments

Comments
 (0)