Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
amorey committed Apr 14, 2024
1 parent 71dce90 commit ace331b
Show file tree
Hide file tree
Showing 5 changed files with 298 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/sveltekit/src/hooks.server.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Handle } from '@sveltejs/kit';
import csrf from 'edge-csrf/sveltekit';
import { createHandle } from 'edge-csrf/sveltekit';

// initalize csrf protection handle
export const handle: Handle = csrf({
export const handle: Handle = createHandle({
cookie: {
secure: process.env.NODE_ENV === 'production',
},
Expand Down
Empty file.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@
"react-dom": "^18.2.0",
"typescript": "^5.4.4",
"vite": "^5.2.8",
"vitest": "^1.4.0"
"vitest": "^1.4.0",
"vitest-environment-miniflare": "^2.14.2"
},
"peerDependencies": {
"next": "^13.0.0 || ^14.0.0",
"@sveltejs/kit": "^2.5.5"
"@sveltejs/kit": "^2.5.5",
"next": "^13.0.0 || ^14.0.0"
},
"keywords": [
"csrf",
Expand Down
Loading

0 comments on commit ace331b

Please sign in to comment.