mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(core)!: Set the secure flag on issued cookies (#8812)
This commit is contained in:
committed by
GitHub
parent
2b0e14e936
commit
0818824a72
@@ -82,6 +82,7 @@ export class AuthService {
|
||||
maxAge: this.jwtExpiration * Time.seconds.toMilliseconds,
|
||||
httpOnly: true,
|
||||
sameSite: 'lax',
|
||||
secure: config.getEnv('secure_cookie'),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ if (inE2ETests) {
|
||||
process.env.N8N_LOG_LEVEL = 'silent';
|
||||
process.env.N8N_PUBLIC_API_DISABLED = 'true';
|
||||
process.env.SKIP_STATISTICS_EVENTS = 'true';
|
||||
process.env.N8N_SECURE_COOKIE = 'false';
|
||||
} else {
|
||||
dotenv.config();
|
||||
}
|
||||
|
||||
@@ -538,6 +538,12 @@ export const schema = {
|
||||
env: 'N8N_PROTOCOL',
|
||||
doc: 'HTTP Protocol via which n8n can be reached',
|
||||
},
|
||||
secure_cookie: {
|
||||
doc: 'This sets the `Secure` flag on n8n auth cookie',
|
||||
format: Boolean,
|
||||
default: true,
|
||||
env: 'N8N_SECURE_COOKIE',
|
||||
},
|
||||
ssl_key: {
|
||||
format: String,
|
||||
default: '',
|
||||
|
||||
Reference in New Issue
Block a user