mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2026-04-28 11:17:38 +02:00
added support for DOMAIN env var insted of file
This commit is contained in:
@@ -24,10 +24,7 @@ import type { Database } from 'better-sqlite3'
|
||||
|
||||
import logger from '../utils/logger'
|
||||
import dbtools from '../utils/dbtools'
|
||||
import { paths } from '../utils/files'
|
||||
import utils from '../utils/utils'
|
||||
|
||||
const domain = utils.ReadFile(paths.domainFile).trim()
|
||||
import constants from '../constants'
|
||||
|
||||
interface Options {
|
||||
userDB: Database
|
||||
@@ -56,7 +53,7 @@ function renderLogin(req: Request, res: Response) {
|
||||
} else {
|
||||
res.render('login', {
|
||||
useHttp: process.env.NS_NO_HTTPS_FORCE,
|
||||
domain: domain,
|
||||
domain: constants.domain,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user