pull/8051/merge
bshakeel86 1 week ago committed by GitHub
commit 6184eb654c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -45,6 +45,7 @@ module.exports = {
getCookieOpts () { getCookieOpts () {
return { return {
expires: DateTime.utc().plus({ days: 365 }).toJSDate(), expires: DateTime.utc().plus({ days: 365 }).toJSDate(),
httpOnly: true,
...(WIKI.config.host.startsWith('https://') ? { secure: true } : {}) ...(WIKI.config.host.startsWith('https://') ? { secure: true } : {})
} }
} }

@ -292,7 +292,7 @@ module.exports = class Page extends Model {
locale: opts.locale, locale: opts.locale,
path: opts.path path: opts.path
})) { })) {
scriptJs = opts.scriptJs || '' scriptJs = opts.scriptJs ? opts.scriptJs.replace(/<script/gi, '') : ''
} }
// -> Create page // -> Create page
@ -419,7 +419,7 @@ module.exports = class Page extends Model {
locale: opts.locale, locale: opts.locale,
path: opts.path path: opts.path
})) { })) {
scriptJs = opts.scriptJs || '' scriptJs = opts.scriptJs ? opts.scriptJs.replace(/<script/gi, '') : ''
} }
// -> Update page // -> Update page

Loading…
Cancel
Save