Skip to content

Commit e813101

Browse files
authored
fix: add cookies route to middleware config (#1730)
* fix: add cookies route to middleware config * test: add test * fix: conflict
1 parent 4117137 commit e813101

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

cypress/integration/middleware/standard.spec.ts

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ describe('Standard middleware', () => {
1919
expect(response.headers).to.have.property('x-modified-edge', 'true')
2020
})
2121
})
22+
23+
it('adds cookies', () => {
24+
cy.request('/cookies').then(() => {
25+
cy.getCookie('netlifyCookie').should('have.property', 'value', 'true')
26+
})
27+
})
2228
})
2329

2430
describe('Middleware matchers', () => {

demos/middleware/middleware.ts

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export const config = {
9494
'/api/:all*',
9595
'/headers',
9696
{ source: '/static' },
97+
{ source: '/cookies' },
9798
{ source: '/shows/((?!99|88).*)' },
9899
{
99100
source: '/conditional',

0 commit comments

Comments
 (0)