mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
public dir fixes
This commit is contained in:
parent
066598ba76
commit
5a34115869
4 changed files with 5 additions and 13 deletions
|
@ -31,6 +31,7 @@ import {
|
|||
} from '../../../types/basicTypes'
|
||||
import dbtools from '../../../utils/dbtools'
|
||||
import { queueWork } from '../../../worker/workerPool'
|
||||
import constants from '../../../constants'
|
||||
|
||||
const minimumAlowwedSessions = 2 // how many sessions are allowed for a user
|
||||
const usersDbBackupPath = 'data/dbs/backup'
|
||||
|
@ -91,9 +92,8 @@ function createDefaultUser(userDb: Database) {
|
|||
const validationTokenName = 'qmining' // readValidationTokenName()
|
||||
|
||||
function setup(data: SubmoduleData): Submodule {
|
||||
const { app, userDB, url } = data
|
||||
const domain: any = url
|
||||
logger.DebugLog(`Cookie domain: ${domain}`, 'cookie', 1)
|
||||
const { app, userDB } = data
|
||||
logger.DebugLog(`Cookie domain: ${constants.domain}`, 'cookie', 1)
|
||||
|
||||
const userCount = dbtools
|
||||
.TableInfo(userDB, 'users')
|
||||
|
@ -245,7 +245,7 @@ function setup(data: SubmoduleData): Submodule {
|
|||
|
||||
// https://www.npmjs.com/package/cookie
|
||||
res.cookie('sessionID', sessionID, {
|
||||
domain: domain,
|
||||
domain: constants.domain,
|
||||
expires: new Date(
|
||||
new Date().getTime() + 10 * 365 * 24 * 60 * 60 * 1000
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue