🎨 粘贴安全策略提示.

This commit is contained in:
lijiahangmax
2024-03-24 23:07:16 +08:00
parent cf188451dd
commit fade56b12a
22 changed files with 106 additions and 40 deletions

View File

@@ -1,5 +1,10 @@
const debug = import.meta.env.MODE !== 'production';
// 当前环境是否为安全环境
export const isSecureEnvironment = (() => {
return window.location.protocol === 'https:' || window.location.hostname === 'localhost';
})();
// http base url
export const httpBaseUrl = (() => {
const configBase = import.meta.env.VITE_API_BASE_URL;