Commit abbe5683 authored by 邓晓峰's avatar 邓晓峰

fix: 修复https安全降级

parent b1524af6
Pipeline #39203 passed with stages
in 13 minutes 56 seconds
/* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
const proxyURL = 'https://work.panda-water.cn';
const proxyURL = 'http://192.168.10.150:8014';
module.exports = {
assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
dev: {
......
......@@ -22,6 +22,8 @@ const defaultSetting = config.layout;
function App(props) {
//
const metaSecurity = /https/.test(window.location.protocol) ? <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"></meta>: null;
return (
<>
<Helmet
......@@ -35,6 +37,9 @@ function App(props) {
href={`https://panda-water.cn/web4/${props.global &&
props.global.shortcutIcon}`}
/>
{
metaSecurity
}
<meta
name="description"
content={`${props.global && props.global.title}`}
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> -->
<!-- The first thing in any HTML file should be the charset -->
<meta charset="utf-8" />
<!-- Make the page mobile compatible -->
......
......@@ -186,7 +186,8 @@ export const defaultApp = () => {
if(config && config.home) {
setDefaultMountApp(`/civbase/${config.home.path.replace(/^\//, '')}`);
} else {
const homepage = _.isNull(config.homepage) ? '': '/' + config.homepage;
debugger
const homepage = _.isNull(config.homepage) ? '/index': '/' + config.homepage;
setDefaultMountApp(`/${pkg.name.toLocaleLowerCase()}/${basePath}${homepage}`);
createStoreage.set('init_web4', true)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment