File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -5,17 +5,15 @@ export async function handle({ request, resolve }) {
55 const cookies = cookie . parse ( request . headers . cookie || '' ) ;
66 request . locals . userid = cookies . userid || uuid ( ) ;
77
8- // TODO https://github.com/sveltejs/kit/issues/1046
9- if ( request . query . has ( '_method' ) ) {
10- request . method = request . query . get ( '_method' ) . toUpperCase ( ) ;
11- }
12-
138 const response = await resolve ( request ) ;
149
1510 if ( ! cookies . userid ) {
1611 // if this is the first time the user has visited this app,
1712 // set a cookie so that we recognise them when they return
18- response . headers [ 'set-cookie' ] = `userid=${ request . locals . userid } ; Path=/; HttpOnly` ;
13+ response . headers [ 'set-cookie' ] = cookie . serialize ( 'userid' , request . locals . userid , {
14+ path : '/' ,
15+ httpOnly : true
16+ } ) ;
1917 }
2018
2119 return response ;
Original file line number Diff line number Diff line change 66
77<header class =" header" >
88 <span class =" title" >svelte-eslint-parser</span >
9- <a class ="menu" class:active ={$page .path === ' /' } sveltekit:prefetch href =" {baseUrl }/" >AST</a >
109 <a
1110 class =" menu"
12- class:active ={$page .path === ' /playground' }
11+ class:active ={$page .url .pathname === ` ${baseUrl }/ ` }
12+ sveltekit:prefetch
13+ href =" {baseUrl }/" >AST</a
14+ >
15+ <a
16+ class =" menu"
17+ class:active ={$page .url .pathname === ` ${baseUrl }/playground ` }
1318 sveltekit:prefetch
1419 href =" {baseUrl }/playground" >Playgroud</a
1520 >
16- <a class ="menu" class:active ={$page .path === ' /scope' } sveltekit:prefetch href =" {baseUrl }/scope"
17- >Scope</a
21+ <a
22+ class =" menu"
23+ class:active ={$page .url .pathname === ` ${baseUrl }/scope ` }
24+ sveltekit:prefetch
25+ href =" {baseUrl }/scope" >Scope</a
1826 >
1927 <SnsBar />
2028 <a href =" https://github.com/ota-meshi/svelte-eslint-parser" class =" github-link" >View on GitHub</a >
You can’t perform that action at this time.
0 commit comments