OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-booking commits / 6cb6f15

Fix identity.js: resolve noble import paths relative to script src
Dynamic import() used absolute paths (/web/vendor/...) which broke behind reverse proxy with prefix. Now detects vendor path from own script tag src attribute. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6cb6f15903a90f9c01d3ed7e629ab8972c23f57c
by plankatron <fleeky@gmail.com> · 2026-03-22T20:35:36.000Z

Changed files (1) +6 -2

web/js/identity.js +6 -2
……@@ -30,9 +30,13 @@ window.HyperBookingIdentity = (function () {
3030
3131 nobleLoading = (async function () {
3232 try {
33 var module = await import('/web/vendor/noble-ed25519.js')
33 // Resolve vendor path from this script's src attribute
34 var scriptEl = document.querySelector('script[src*="identity.js"]')
35 var scriptSrc = scriptEl ? scriptEl.src : location.href
36 var vendorBase = scriptSrc.replace(/\/js\/identity\.js.*$/, '/vendor/')
37 var module = await import(vendorBase + 'noble-ed25519.js')
3438 ed = module
35 var hashModule = await import('/web/vendor/noble-sha512.js')
39 var hashModule = await import(vendorBase + 'noble-sha512.js')
3640 sha512 = hashModule.sha512
3741 ed.etc.sha512Sync = function () {
3842 return sha512.apply(null, arguments)