删除对 configSec.js 的需求,直接嵌入代码
This commit is contained in:
@@ -1,22 +1,21 @@
|
||||
module.exports = {
|
||||
protocol: 'http',
|
||||
host: 'localhost',
|
||||
protocol: 'https',
|
||||
host: 'server.vic.yuanjin.net',
|
||||
port: undefined,
|
||||
// 如果使用 https 协议,必须填写以下内容,或在命令行参数中设置:
|
||||
sslType: 'file', // file|greenlock
|
||||
sslDomainList: [],
|
||||
sslKey: 'ssl/privkey.pem', // ssl key file,
|
||||
sslCert: 'ssl/fullchain.pem', // ssl cert file,
|
||||
sslCA: 'ssl/client-cert.pem', // ssl ca file,
|
||||
|
||||
sslKey: '/etc/letsencrypt/live/server.vic.yuanjin.net/privkey.pem', // ssl key file,
|
||||
sslCert: '/etc/letsencrypt/live/server.vic.yuanjin.net/fullchain.pem', // ssl cert file,
|
||||
sslCA: '/etc/letsencrypt/live/server.vic.yuanjin.net/cert.pem', // ssl ca file,
|
||||
|
||||
deploy: {
|
||||
type: 'web',
|
||||
host: '', // 待部署到的主机
|
||||
host: 'server.vic.yuanjin.net', // 待部署到的主机
|
||||
port: '22', // 带部署到的主机的 SSH 端口
|
||||
dir: '/home/tic/node.console.web', // 待部署到的目录路径
|
||||
dir: '/home/adot/vic-admin', // 待部署到的目录路径
|
||||
dist: 'dist', // 待部署到的文件夹
|
||||
user: 'tic', // 登录用户名
|
||||
user: 'adot', // 登录用户名
|
||||
password: '', // 登录用户密码
|
||||
key: `${process.env.HOME}/.ssh/id_rsa`, // 登录用户私钥文件
|
||||
},
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"deploy": "node ./node_modules/deployer/deploy.js",
|
||||
"daemon": "cross-env NODE_ENV=production node server.js",
|
||||
"daemon.sup": "cross-env NODE_ENV=production supervisor -i data.log,node_modules,dist -- server.js",
|
||||
"daemon.pm2": "cross-env NODE_ENV=production pm2 start server.js -name node.console.web",
|
||||
"daemon.pm2": "cross-env NODE_ENV=production pm2 start server.js --name vic.admin",
|
||||
"lint": "vue-cli-service lint",
|
||||
"test:unit": "vue-cli-service test:unit"
|
||||
},
|
||||
|
||||
@@ -5,7 +5,6 @@ import _ from 'lodash'
|
||||
import ticCrypto from 'tic.crypto'
|
||||
import axios from 'axios'
|
||||
import * as Ticrypto from 'tic.crypto'
|
||||
import { tokenSec } from '../../../configSec'
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
@@ -51,7 +50,7 @@ export default {
|
||||
const passwd = Ticrypto.hash(state.passwd)
|
||||
const ts = Date.now()
|
||||
const path = '/admin/in'
|
||||
const sig = ticCrypto.hash(ts + path + tokenSec, { hasher: 'md5' })
|
||||
const sig = ticCrypto.hash(ts + path + 'LimitSaltLOL8080', { hasher: 'md5' })
|
||||
let result = await axios.post('admin/in', { name: state.username, passwd }, { headers: { ts, sig } })
|
||||
commit('updateSign', false)
|
||||
if (result.data.code === 0) {
|
||||
|
||||
Reference in New Issue
Block a user