Skip to content
Myr

Merge commit from fork

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

authored by Yusuke Wada · committed by GitHub · parent b0af71f · Browse files · 2 files+13 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+13 added−1 removed

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

2 files+13 added−1 removed

modified:src/middleware/csrf/index.test.ts+12 added
192 unmodified lines
193194 expect(res.status).toBe(200)195 expect(await res.text()).toBe('hono')196 })197198 it('should be 403 for "Application/x-www-form-urlencoded" cross origin', async () => {199 const res = await app.request('http://localhost/form', {200 method: 'POST',201 headers: Object.assign({202 'content-type': 'Application/x-www-form-urlencoded',203 }),204 body: 'name=hono',205 })206 expect(res.status).toBe(403)207 expect(simplePostHandler).not.toHaveBeenCalled()208 })209 })210211 describe('with origin option', () => {212 describe('string', () => {
106 unmodified lines
modified:src/middleware/csrf/index.ts+1 added-1 removed