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
3 years ago
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
Hide 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 */
// 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
=
{
assetsRoot
:
process
.
env
.
NODE_ENV
!==
'production'
?
proxyURL
:
'./'
,
dev
:
{
...
...
This diff is collapsed.
Click to expand it.
src/containers/App/index.js
View file @
abbe5683
...
...
@@ -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
}
`
}
...
...
This diff is collapsed.
Click to expand it.
src/index.ejs
View file @
abbe5683
<!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 -->
...
...
This diff is collapsed.
Click to expand it.
src/micro.js
View file @
abbe5683
...
...
@@ -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
)
}
...
...
This diff is collapsed.
Click to expand it.
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