mirror of
https://github.com/plankanban/planka.git
synced 2025-12-18 01:11:13 +03:00
feat: Additional httpOnly token for enhanced security in browsers
This commit is contained in:
@@ -8,9 +8,12 @@
|
||||
* https://sailsjs.com/config/custom
|
||||
*/
|
||||
|
||||
const url = require('url');
|
||||
const path = require('path');
|
||||
const sails = require('sails');
|
||||
|
||||
const parsedBasedUrl = new url.URL(process.env.BASE_URL);
|
||||
|
||||
module.exports.custom = {
|
||||
/**
|
||||
*
|
||||
@@ -19,6 +22,8 @@ module.exports.custom = {
|
||||
*/
|
||||
|
||||
baseUrl: process.env.BASE_URL,
|
||||
baseUrlPath: parsedBasedUrl.pathname,
|
||||
baseUrlSecure: parsedBasedUrl.protocol === 'https:',
|
||||
|
||||
tokenExpiresIn: parseInt(process.env.TOKEN_EXPIRES_IN, 10) || 365,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user