Skip to content

Commit 9c2689c

Browse files
authored
Merge branch 'main' into next-js-images
2 parents 5cf563d + e813101 commit 9c2689c

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)