mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
鉴定网络热门网络安全平台之于 /constant/jquery-3.1.0.js 检测到有漏洞的 Javascript 库
This commit is contained in:
2 files changed
+2
-4
No files matched your search
@@ -146,10 +146,9 @@ export async function buildUI() {
|
||||
class UiConstantsHandler extends Handler {
|
||||
noCheckPermView = true;
|
||||
|
||||
@param('name', Types.Filename, true)
|
||||
@param('name', Types.Filename)
|
||||
async all(domainId: string, name: string) {
|
||||
this.response.type = 'application/javascript';
|
||||
name ||= 'entry.js';
|
||||
if (!vfs[name]) throw new NotFoundError(name);
|
||||
this.response.addHeader('ETag', hashes[name]);
|
||||
this.response.body = vfs[name];
|
||||
@@ -158,7 +157,6 @@ class UiConstantsHandler extends Handler {
|
||||
}
|
||||
|
||||
export async function apply(ctx: Context) {
|
||||
ctx.Route('constant', '/constant/:version', UiConstantsHandler);
|
||||
ctx.Route('constant', '/lazy/:version/:name', UiConstantsHandler);
|
||||
ctx.Route('constant', '/resource/:version/:name', UiConstantsHandler);
|
||||
ctx.on('app/started', buildUI);
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</head>
|
||||
<body>
|
||||
{% if not isIE(handler.request.headers['user-agent']) and not handler.session.legacy %}
|
||||
<script type="text/javascript" src="/constant/{{ UiContext.constantVersion }}.js"></script>
|
||||
<script type="text/javascript" src="/resource/{{ UiContext.constantVersion }}/entry.js"></script>
|
||||
<script type="text/javascript" src="{{ UiContext.cdn_prefix }}resource/{{ global.Hydro.version['ui-default'] }}/lang-{{ _('__id') }}.js"></script>
|
||||
<script type="text/javascript" src="{{ UiContext.cdn_prefix }}hydro-{{ global.Hydro.version['ui-default'] }}.js{% if process.env.DEV %}?version=dev{% endif %}"></script>
|
||||
{% endif %}
|
||||
|
||||
Reference in new issue
Block a user