mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Expose Link via CORS.
This commit is contained in:
parent
0271536313
commit
643ceced36
@ -17,6 +17,7 @@
|
||||
"options_credentials": true,
|
||||
"options_exposedHeaders": [
|
||||
"Accept-Patch",
|
||||
"Link",
|
||||
"Location",
|
||||
"MS-Author-Via",
|
||||
"Updates-Via",
|
||||
|
@ -99,6 +99,12 @@ describe('An http server with middleware', (): void => {
|
||||
expect(exposed.split(/\s*,\s*/u)).toContain('Accept-Patch');
|
||||
});
|
||||
|
||||
it('exposes the Link header via CORS.', async(): Promise<void> => {
|
||||
const res = await request(server).get('/').expect(200);
|
||||
const exposed = res.header['access-control-expose-headers'];
|
||||
expect(exposed.split(/\s*,\s*/u)).toContain('Link');
|
||||
});
|
||||
|
||||
it('exposes the Location header via CORS.', async(): Promise<void> => {
|
||||
const res = await request(server).get('/').expect(200);
|
||||
const exposed = res.header['access-control-expose-headers'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user