修复协议协议判断错误导致https站点不能连接的问题
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
// prod
|
||||
let wsPrefix;
|
||||
if (window.location.protocol === 'https') {
|
||||
if (window.location.protocol === 'https:') {
|
||||
wsPrefix = 'wss:'
|
||||
} else {
|
||||
wsPrefix = 'ws:'
|
||||
@ -8,7 +8,7 @@ if (window.location.protocol === 'https') {
|
||||
|
||||
export const server = '';
|
||||
export const wsServer = wsPrefix + window.location.host;
|
||||
export const prefix = window.location.protocol + ':' + window.location.host;
|
||||
export const prefix = window.location.protocol + '//' + window.location.host;
|
||||
|
||||
// dev
|
||||
// export const server = '//127.0.0.1:8088';
|
||||
|
@ -52,7 +52,6 @@ class Dashboard extends Component {
|
||||
this.setState({
|
||||
session: result['data']
|
||||
})
|
||||
console.log('set session', this.state.session)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user