1
0
Fork 0
mirror of synced 2024-09-29 08:41:16 +13:00

Revert "sameSite and secure cookie settings"

This commit is contained in:
Martin McKeaveney 2022-01-17 09:39:22 +01:00 committed by GitHub
parent 8f54f4a0fc
commit 0159d52aa6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 14 deletions

View file

@ -6,13 +6,6 @@ function isTest() {
)
}
function isDev() {
return (
process.env.NODE_ENV !== "production" &&
process.env.BUDIBASE_ENVIRONMENT !== "production"
)
}
module.exports = {
JWT_SECRET: process.env.JWT_SECRET,
COUCH_DB_URL: process.env.COUCH_DB_URL,
@ -34,7 +27,6 @@ module.exports = {
COOKIE_DOMAIN: process.env.COOKIE_DOMAIN,
PLATFORM_URL: process.env.PLATFORM_URL,
isTest,
isDev,
_set(key, value) {
process.env[key] = value
module.exports[key] = value

View file

@ -23,7 +23,6 @@ const { getUserSessions, invalidateSessions } = require("./security/sessions")
const { migrateIfRequired } = require("./migrations")
const { USER_EMAIL_VIEW_CASING } = require("./migrations").MIGRATIONS
const { GLOBAL_DB } = require("./migrations").MIGRATION_DBS
const { isDev, isTest } = require("./environment")
const APP_PREFIX = DocumentTypes.APP + SEPARATOR
@ -109,11 +108,6 @@ exports.setCookie = (ctx, value, name = "builder", opts = { sign: true }) => {
overwrite: true,
}
if (!isDev() && !isTest()) {
config.sameSite = "none"
config.secure = true
}
if (environment.COOKIE_DOMAIN) {
config.domain = environment.COOKIE_DOMAIN
}