Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivWeb
Commits
abbe5683
Commit
abbe5683
authored
Dec 01, 2021
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复https安全降级
parent
b1524af6
Pipeline
#39203
passed with stages
in 13 minutes 56 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
3 deletions
+9
-3
proxy.js
config/proxy.js
+1
-1
index.js
src/containers/App/index.js
+5
-0
index.ejs
src/index.ejs
+1
-1
micro.js
src/micro.js
+2
-1
No files found.
config/proxy.js
View file @
abbe5683
/* eslint-disable */
/* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
const
proxyURL
=
'http
s://work.panda-water.cn
'
;
const
proxyURL
=
'http
://192.168.10.150:8014
'
;
module
.
exports
=
{
module
.
exports
=
{
assetsRoot
:
process
.
env
.
NODE_ENV
!==
'production'
?
proxyURL
:
'./'
,
assetsRoot
:
process
.
env
.
NODE_ENV
!==
'production'
?
proxyURL
:
'./'
,
dev
:
{
dev
:
{
...
...
src/containers/App/index.js
View file @
abbe5683
...
@@ -22,6 +22,8 @@ const defaultSetting = config.layout;
...
@@ -22,6 +22,8 @@ const defaultSetting = config.layout;
function
App
(
props
)
{
function
App
(
props
)
{
//
const
metaSecurity
=
/https/
.
test
(
window
.
location
.
protocol
)
?
<
meta
http
-
equiv
=
"Content-Security-Policy"
content
=
"upgrade-insecure-requests"
><
/meta>: null
;
return
(
return
(
<>
<>
<
Helmet
<
Helmet
...
@@ -35,6 +37,9 @@ function App(props) {
...
@@ -35,6 +37,9 @@ function App(props) {
href
=
{
`https://panda-water.cn/web4/
${
props
.
global
&&
href
=
{
`https://panda-water.cn/web4/
${
props
.
global
&&
props
.
global
.
shortcutIcon
}
`
}
props
.
global
.
shortcutIcon
}
`
}
/
>
/
>
{
metaSecurity
}
<
meta
<
meta
name
=
"description"
name
=
"description"
content
=
{
`
${
props
.
global
&&
props
.
global
.
title
}
`
}
content
=
{
`
${
props
.
global
&&
props
.
global
.
title
}
`
}
...
...
src/index.ejs
View file @
abbe5683
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"en"
>
<html
lang=
"en"
>
<head>
<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 -->
<!-- The first thing in any HTML file should be the charset -->
<meta
charset=
"utf-8"
/>
<meta
charset=
"utf-8"
/>
<!-- Make the page mobile compatible -->
<!-- Make the page mobile compatible -->
...
...
src/micro.js
View file @
abbe5683
...
@@ -186,7 +186,8 @@ export const defaultApp = () => {
...
@@ -186,7 +186,8 @@ export const defaultApp = () => {
if
(
config
&&
config
.
home
)
{
if
(
config
&&
config
.
home
)
{
setDefaultMountApp
(
`/civbase/
${
config
.
home
.
path
.
replace
(
/^
\/
/
,
''
)}
`
);
setDefaultMountApp
(
`/civbase/
${
config
.
home
.
path
.
replace
(
/^
\/
/
,
''
)}
`
);
}
else
{
}
else
{
const
homepage
=
_
.
isNull
(
config
.
homepage
)
?
''
:
'/'
+
config
.
homepage
;
debugger
const
homepage
=
_
.
isNull
(
config
.
homepage
)
?
'/index'
:
'/'
+
config
.
homepage
;
setDefaultMountApp
(
`/
${
pkg
.
name
.
toLocaleLowerCase
()}
/
${
basePath
}${
homepage
}
`
);
setDefaultMountApp
(
`/
${
pkg
.
name
.
toLocaleLowerCase
()}
/
${
basePath
}${
homepage
}
`
);
createStoreage
.
set
(
'init_web4'
,
true
)
createStoreage
.
set
(
'init_web4'
,
true
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment