feat(patentstyle): rename served path /patentstyle/ -> /patentsstyle/ (alias old path for installed-client auto-update)

This commit is contained in:
mAi
2026-06-01 18:08:38 +02:00
parent 31ebec769a
commit cd4ec074ca
5 changed files with 16 additions and 10 deletions

View File

@@ -108,7 +108,7 @@
<p>Bugs, requests, style questions, build problems: <a href="mailto:matthias.siebels@hoganlovells.com?subject=HLC%20Patents%20Style">matthias.siebels@hoganlovells.com</a></p>
<footer>
<p>Update endpoint: <code>paliad.msbls.de/patentstyle/</code> &middot; Mirror: <code>hihlc.msbls.de/patentstyle/</code></p>
<p>Update endpoint: <code>paliad.msbls.de/patentsstyle/</code> &middot; Mirror: <code>hihlc.msbls.de/patentsstyle/</code></p>
<p id="ver"></p>
</footer>

View File

@@ -313,15 +313,21 @@ func Register(mux *http.ServeMux, client *auth.Client, giteaAPIToken string, svc
mux.Handle("GET /icons/", noCacheAssets(http.StripPrefix("/icons/", http.FileServer(http.Dir("dist/icons")))))
mux.HandleFunc("GET /sw.js", servePWAServiceWorker)
// HL Patents Style auto-update endpoint. version.json is the manifest
// the installed Word client polls; HL-Patents-Style.dotm is fetched on
// version mismatch. Source files live in frontend/public/patentstyle/
// (copied into dist/ at build time). noCacheAssets ensures the manifest
// is never stale after a release. patentstyleDownload renames the .dotm
// to "HL Patents Style.dotm" (with spaces) on download — the on-disk
// filename has dashes so the URL is clean, but Word users expect the
// spaced name in their downloads folder.
mux.Handle("GET /patentstyle/", noCacheAssets(patentstyleDownload(http.StripPrefix("/patentstyle/", http.FileServer(http.Dir("dist/patentstyle"))))))
// HLC Patents Style auto-update endpoint. version.json is the manifest
// the installed Word client polls; the .dotm is fetched on version
// mismatch. Source files live in frontend/public/patentsstyle/ (copied
// into dist/ at build time). noCacheAssets ensures the manifest is never
// stale after a release. patentstyleDownload renames the .dotm to its
// spaced name (derived from the requested file) on download.
//
// /patentsstyle/ (brand-consistent: patents+style) is the canonical path.
// /patentstyle/ is a permanent ALIAS to the SAME dist dir: already-
// installed templates hardcode paliad.msbls.de/patentstyle/version.json
// as their sole auto-update URL (work/paliad 2026-06-01) — if it 404s,
// every existing install silently stops auto-updating forever. Both
// routes serve dist/patentsstyle.
mux.Handle("GET /patentsstyle/", noCacheAssets(patentstyleDownload(http.StripPrefix("/patentsstyle/", http.FileServer(http.Dir("dist/patentsstyle"))))))
mux.Handle("GET /patentstyle/", noCacheAssets(patentstyleDownload(http.StripPrefix("/patentstyle/", http.FileServer(http.Dir("dist/patentsstyle"))))))
// Protected routes
protected := http.NewServeMux()