mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix url generation with domainId
This commit is contained in:
1 parent
116415707b
commit
6c274497b4
2 files changed
+2
-2
No files matched your search
@@ -52,7 +52,7 @@ export default (router, logger) => async (ctx: KoaContext, next) => {
|
||||
|| (host instanceof Array
|
||||
? (!host.includes(request.host))
|
||||
: request.host !== host)
|
||||
)) withDomainId = domainId;
|
||||
)) withDomainId ||= domainId;
|
||||
res = router.url(name, args, { query }).toString();
|
||||
if (anchor) res = `${res}#${anchor}`;
|
||||
if (withDomainId) res = `/d/${withDomainId}${res}`;
|
||||
|
||||
Reference in new issue
Block a user