mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +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))
|
? (!host.includes(this.request.host))
|
||||||
: this.request.host !== host)
|
: this.request.host !== host)
|
||||||
)) withDomainId ||= domainId;
|
)) 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 (anchor) res = `${res}#${anchor}`;
|
||||||
if (withDomainId) res = `/d/${withDomainId}${res}`;
|
if (withDomainId) res = `/d/${withDomainId}${res}`;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in new issue
Block a user