mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: fix websocket can not generate url (#825)
This commit is contained in:
1 parent
ae057fee95
commit
311caee154
1 file changed
+1
-1
@@ -209,7 +209,7 @@ export async function apply(ctx: Context) {
|
||||
? (!host.includes(this.request.host))
|
||||
: this.request.host !== host)
|
||||
)) withDomainId ||= domainId;
|
||||
res = this.context.router.url.call(this.context.router, name, args, { query }).toString();
|
||||
res = ctx.server.router.url.call(ctx.server.router, name, args, { query }).toString();
|
||||
if (anchor) res = `${res}#${anchor}`;
|
||||
if (withDomainId) res = `/d/${withDomainId}${res}`;
|
||||
} catch (e) {
|
||||
|
||||
Reference in new issue
Block a user