admin: add http checks
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/602/head
parent
20b2baa613
commit
3113b0041e
|
@ -534,6 +534,34 @@
|
|||
>{{ t("memories", "CUDA scaler") }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
</p>
|
||||
|
||||
<h3>{{ t("memories", "Performance") }}</h3>
|
||||
|
||||
<p>
|
||||
<NcNoteCard :type="isHttps ? 'success' : 'warning'">
|
||||
{{
|
||||
isHttps
|
||||
? t("memories", "HTTPS is enabled")
|
||||
: t(
|
||||
"memories",
|
||||
"You are accessing this page over an insecure context. Several browser APIs are not available, which will make Memories very slow. Enable HTTPS on your server to improve performance."
|
||||
)
|
||||
}}
|
||||
</NcNoteCard>
|
||||
<NcNoteCard :type="httpVerOk ? 'success' : 'warning'">
|
||||
{{
|
||||
httpVerOk
|
||||
? t("memories", "HTTP/2 or HTTP/3 is enabled")
|
||||
: t(
|
||||
"memories",
|
||||
"HTTP/2 or HTTP/3 is strongly recommended ({httpVer} detected)",
|
||||
{
|
||||
httpVer,
|
||||
}
|
||||
)
|
||||
}}
|
||||
</NcNoteCard>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -861,6 +889,21 @@ export default defineComponent({
|
|||
vaapiStatusType(): string {
|
||||
return this.status?.vaapi_dev === "ok" ? "success" : "error";
|
||||
},
|
||||
|
||||
isHttps(): boolean {
|
||||
return window.location.protocol === "https:";
|
||||
},
|
||||
|
||||
httpVer(): string {
|
||||
const entry = window.performance?.getEntriesByType?.(
|
||||
"navigation"
|
||||
)?.[0] as any;
|
||||
return entry?.nextHopProtocol || this.t("memories", "Unknown");
|
||||
},
|
||||
|
||||
httpVerOk(): boolean {
|
||||
return this.httpVer === "h2" || this.httpVer === "h3";
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue