Add reverse proxy test in travis

pull/433/head
Chocobozzz 2018-03-29 11:22:27 +02:00
parent 09e10ac0c9
commit 09becad8e8
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
4 changed files with 5 additions and 3 deletions

View File

@ -70,7 +70,8 @@ export class AuthService {
if (error.status === 403) {
errorMessage = `Cannot retrieve OAuth Client credentials: ${error.text}. \n`
errorMessage += 'Ensure you have correctly configured PeerTube (config/ directory), in particular the "webserver" section.'
errorMessage += 'Ensure you have correctly configured PeerTube (config/ directory), ' +
'in particular the "webserver" section.'
}
// We put a bigger timeout

View File

@ -238,7 +238,7 @@ const CONSTRAINTS_FIELDS = {
const RATES_LIMIT = {
LOGIN: {
WINDOW_MS: 5 * 60 * 1000, // 5 minutes
MAX: 10 // 10 attempts
MAX: 15 // 15 attempts
}
}

View File

@ -11,3 +11,4 @@ import './videos/video-privacy'
import './videos/services'
import './server/email'
import './server/config'
import './server/reverse-proxy'

View File

@ -64,7 +64,7 @@ describe('Test application behind a reverse proxy', function () {
it('Should rate limit logins', async function () {
const user = { username: 'root', password: 'fail' }
for (let i = 0; i < 9; i++) {
for (let i = 0; i < 14; i++) {
await userLogin(server, user, 400)
}