remove the cors test
This commit is contained in:
@@ -79,28 +79,4 @@ describe('Server', function () {
|
||||
expect(error).to.not.be(null);
|
||||
});
|
||||
});
|
||||
|
||||
describe('cors', function () {
|
||||
before(server.start);
|
||||
after(server.stop);
|
||||
|
||||
it('responds to OPTIONS', async function () {
|
||||
const response = await superagent.options(SERVER_URL + '/api/v1/cloudron/status')
|
||||
.set('Access-Control-Request-Method', 'GET')
|
||||
.set('Access-Control-Request-Headers', 'accept, origin, x-superagented-with')
|
||||
.set('Origin', 'http://localhost');
|
||||
|
||||
expect(response.headers['access-control-allow-methods']).to.be('GET, PUT, DELETE, POST, OPTIONS');
|
||||
expect(response.headers['access-control-allow-credentials']).to.be('false');
|
||||
expect(response.headers['access-control-allow-headers']).to.be('accept, origin, x-superagented-with'); // mirrored from superagent
|
||||
expect(response.headers['access-control-allow-origin']).to.be('http://localhost'); // mirrors from superagent
|
||||
});
|
||||
|
||||
it('does not crash for malformed origin', async function () {
|
||||
const response = await superagent.options(SERVER_URL + '/api/v1/cloudron/status')
|
||||
.set('Origin', 'foobar')
|
||||
.ok(() => true);
|
||||
expect(response.status).to.be(405);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user