mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
多时区支持
This commit is contained in:
1 parent
d14b63883e
commit
8c20c34d8b
9 files changed
+163
-104
No files matched your search
@@ -306,8 +306,12 @@ function Route(route, RouteHandler, permission = null) {
|
||||
domainId: 'system', ...ctx.params, ...ctx.query, ...ctx.request.body,
|
||||
};
|
||||
if (h.request.host !== await system.get('server.host')) {
|
||||
args.domainId = (h.request.url.split('//')[1] || '')
|
||||
.split(`.${await system.get('server.host')}`)[0] || 'system';
|
||||
try {
|
||||
args.domainId = (h.request.url.split('//')[1] || '')
|
||||
.split(`.${await system.get('server.host')}`)[0] || 'system';
|
||||
} catch (e) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
|
||||
if (h.___prepare) await h.___prepare(args);
|
||||
|
||||
Reference in new issue
Block a user