Browse Source

redis pswd

master
巴林闲侠 2 years ago
parent
commit
0610537a48
  1. 4
      code/api/app/lib/service/redis.js
  2. 1
      code/web/client/index.ejs
  3. 1
      code/web/client/index.html

4
code/api/app/lib/service/redis.js

@ -3,7 +3,9 @@ const redis = require("ioredis")
const moment = require('moment')
module.exports = async function factory (app, opts) {
let client = new redis(opts.redis.port, opts.redis.host);
let client = new redis(opts.redis.port, opts.redis.host, {
password: opts.redis.pwd,
});
client.on("error", function (err) {
app.fs.logger.error('info', '[FS-AUTH-REDIS]', 'redis connect error.');

1
code/web/client/index.ejs

@ -4,6 +4,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width" />
<meta content="upgrade-insecure-requests" http-equiv="Content-Security-Policy">
<link rel="shortcut icon" href="/assets/images/favicon.ico">
</head>

1
code/web/client/index.html

@ -4,6 +4,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width" />
<meta content="upgrade-insecure-requests" http-equiv="Content-Security-Policy">
<link rel="shortcut icon" href="/assets/images/favicon.ico">
</head>

Loading…
Cancel
Save