mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
redis checkpoint
This commit is contained in:
parent
10cc6616c5
commit
818f8721e9
10 changed files with 187 additions and 34 deletions
|
|
@ -12,7 +12,7 @@ import { uuid } from 'lib/crypto';
|
|||
export default async (req, res) => {
|
||||
await useCors(req, res);
|
||||
|
||||
if (isbot(req.headers['user-agent'])) {
|
||||
if (isbot(req.headers['user-agent']) && !process.env.DISABLE_BOT_CHECK) {
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
import { redis } from 'lib/redis';
|
||||
import { ok } from 'lib/response';
|
||||
|
||||
export default async (req, res) => {
|
||||
return ok(res, 'nice');
|
||||
console.log('------------------------------------------------------------------------------');
|
||||
// const redis = new createClient({
|
||||
// url: process.env.REDIS_URL,
|
||||
// });
|
||||
|
||||
//console.log(redis.get);
|
||||
|
||||
const value = await redis.get('session:77c0b9de-677a-5268-8543-6018f0776a81');
|
||||
console.log('complete');
|
||||
|
||||
return ok(res, value);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue