Skip to content
Myr

fix(middleware/cors): explicitly return No Content for statusText in options request (#3719)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Shawn Carr · committed by GitHub · parent 80c7e22 · Browse files · 2 files+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−1 removed

  • tests:+1 added−0 removed
  • other:+1 added−1 removed

2 files+2 added−1 removed

modified:src/middleware/cors/index.test.ts+1 added
79 unmodified lines
80 req.headers.append('Access-Control-Request-Headers', 'X-PINGOTHER, Content-Type')81 const res = await app.request(req)8283 expect(res.status).toBe(204)84 expect(res.statusText).toBe('No Content')85 expect(res.headers.get('Access-Control-Allow-Methods')?.split(',')[0]).toBe('GET')86 expect(res.headers.get('Access-Control-Allow-Headers')?.split(',')).toEqual([87 'X-PINGOTHER',88 'Content-Type',
118 unmodified lines
modified:src/middleware/cors/index.ts+1 added-1 removed