Merge pull request #228 from clems4ever/domain-provided

Make sure session.domain is provided in config.yml
This commit is contained in:
Clément Michaud 2018-05-17 09:14:57 +02:00 committed by GitHub
commit f67bb69ee0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 7 deletions

View File

@ -63,7 +63,7 @@ interface SessionCookieConfiguration {
secret: string;
expiration?: number;
inactivity?: number;
domain?: string;
domain: string;
redis?: SessionRedisOptions;
}

View File

@ -26,6 +26,7 @@ describe("test validator", function () {
"data.regulation should have required property 'ban_time'",
"data.regulation should have required property 'find_time'",
"data.regulation should have required property 'max_retries'",
"data.session should have required property 'domain'",
"data.session should have required property 'secret'",
"Storage must be either 'local' or 'mongo'",
"A notifier needs to be declared when server is used with two-factor"
@ -47,7 +48,8 @@ describe("test validator", function () {
max_retries: 3
},
session: {
secret: "unsecure_secret"
secret: "unsecure_secret",
domain: "mydomain"
},
storage: {
abc: {}
@ -80,7 +82,8 @@ describe("test validator", function () {
max_retries: 3
},
session: {
secret: "unsecure_secret"
secret: "unsecure_secret",
domain: "mydomain"
},
storage: {
local: {
@ -109,7 +112,8 @@ one second factor enabled sub-domain", function () {
max_retries: 3
},
session: {
secret: "unsecure_secret"
secret: "unsecure_secret",
domain: "mydomain"
},
storage: {
local: {
@ -141,7 +145,8 @@ one second factor enabled sub-domain", function () {
max_retries: 3
},
session: {
secret: "unsecure_secret"
secret: "unsecure_secret",
domain: "mydomain"
},
storage: {
local: {
@ -166,7 +171,8 @@ one second factor enabled sub-domain", function () {
max_retries: 3
},
session: {
secret: "unsecure_secret"
secret: "unsecure_secret",
domain: "mydomain"
},
storage: {
local: {

View File

@ -58,7 +58,8 @@ export class ServerVariablesMockBuilder {
max_retries: 3
},
session: {
secret: "my_secret"
secret: "my_secret",
domain: "mydomain"
},
storage: {}
},