mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Allow credentials over CORS.
This commit is contained in:
parent
bf61007eec
commit
ee072b038a
@ -16,6 +16,7 @@
|
|||||||
"PATCH",
|
"PATCH",
|
||||||
"DELETE"
|
"DELETE"
|
||||||
],
|
],
|
||||||
|
"CorsHandler:_options_credentials": true,
|
||||||
"CorsHandler:_options_exposedHeaders": [
|
"CorsHandler:_options_exposedHeaders": [
|
||||||
"Location",
|
"Location",
|
||||||
"Updates-Via"
|
"Updates-Via"
|
||||||
|
@ -44,6 +44,7 @@ describe('An Express server with middleware', (): void => {
|
|||||||
it('returns CORS headers for an OPTIONS request.', async(): Promise<void> => {
|
it('returns CORS headers for an OPTIONS request.', async(): Promise<void> => {
|
||||||
const res = await request(server)
|
const res = await request(server)
|
||||||
.options('/')
|
.options('/')
|
||||||
|
.set('Access-Control-Allow-Credentials', 'true')
|
||||||
.set('Access-Control-Request-Headers', 'content-type')
|
.set('Access-Control-Request-Headers', 'content-type')
|
||||||
.set('Access-Control-Request-Method', 'POST')
|
.set('Access-Control-Request-Method', 'POST')
|
||||||
.set('Host', 'test.com')
|
.set('Host', 'test.com')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user