Allow api3 behind reverse proxy (#5631)

* Allow api3 behind reverse proxy

* fix test

Co-authored-by: Sulka Haro <sulka@sulka.net>
This commit is contained in:
Milos Kozak
2021-01-17 19:46:28 +02:00
committed by GitHub
co-authored by Sulka Haro
parent ccd591d4ef
commit f6f7e18888
2 changed files with 16 additions and 16 deletions
+11 -11
View File
@@ -33,16 +33,16 @@ describe('Security of REST API3', function() {
});
it('should require HTTPS', async () => {
if (semver.gte(process.version, '10.0.0')) {
let res = await request(self.http.baseUrl) // hangs on 8.x.x (no reason why)
.get('/api/v3/test')
.expect(403);
res.body.status.should.equal(403);
res.body.message.should.equal(apiConst.MSG.HTTP_403_NOT_USING_HTTPS);
}
});
// it('should require HTTPS', async () => {
// if (semver.gte(process.version, '10.0.0')) {
// let res = await request(self.http.baseUrl) // hangs on 8.x.x (no reason why)
// .get('/api/v3/test')
// .expect(403);
//
// res.body.status.should.equal(403);
// res.body.message.should.equal(apiConst.MSG.HTTP_403_NOT_USING_HTTPS);
// }
// });
it('should require Date header', async () => {
@@ -186,4 +186,4 @@ describe('Security of REST API3', function() {
.expect(200);
});
});
});