ui: 优化资源加载

This commit is contained in:
undefined committed 2021-06-11 16:03:40 +08:00
1 parent bc74870a39
commit 167c70c2b1
24 files changed
+167 -188

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ export const PERM = {
PERM_DELETE_DISCUSSION: 1n << 32n,
PERM_DELETE_DISCUSSION_SELF: 1n << 33n,
PERM_REPLY_DISCUSSION: 1n << 34n,
PERM_ADD_REACTION: 1 << 62n,
PERM_ADD_REACTION: 1n << 62n,
PERM_EDIT_DISCUSSION_REPLY_SELF: 1n << 36n,
PERM_DELETE_DISCUSSION_REPLY: 1n << 38n,
PERM_DELETE_DISCUSSION_REPLY_SELF: 1n << 39n,
+1 -1
View File
@@ -445,7 +445,7 @@ export class Handler extends HandlerCommon {
disposition: null,
};
this.UiContext = cloneDeep(UiContextBase);
this.UiContext.cdn_prefix = system.get('server.cdn');
if (!process.env.DEV) this.UiContext.cdn_prefix = system.get('server.cdn');
this.session = {};
const [xff, xhost] = system.getMany(['server.xff', 'server.xhost']);
if (xff) this.request.ip = this.request.headers[xff.toLowerCase()] || this.request.ip;