diff --git a/src/daemon/run.ts b/src/daemon/run.ts index 813a700..ea672f1 100644 --- a/src/daemon/run.ts +++ b/src/daemon/run.ts @@ -174,13 +174,15 @@ class Daemon { async startWebAuth() { if (!this.config.authPort) return; - const prefix = new URL(this.config.baseUrl as string).pathname.replace(/\/+$/, ''); + const urlPrefix = new URL(this.config.baseUrl as string).pathname.replace(/\/+$/, ''); this.fastify.register(FastifyView, { engine: { - handlebars: Handlebars + handlebars: Handlebars, }, - prefix + defaultContext: { + urlPrefix + } }); this.fastify.listen({ port: this.config.authPort }); diff --git a/templates/createAccount.handlebar b/templates/createAccount.handlebar index 34bd312..8af35b3 100644 --- a/templates/createAccount.handlebar +++ b/templates/createAccount.handlebar @@ -87,7 +87,7 @@