Skip to content

Commit

Permalink
Bug repro
Browse files Browse the repository at this point in the history
  • Loading branch information
lxhom committed Mar 7, 2023
1 parent 1ba6187 commit f8d580e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/routes/from/+server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import {redirect} from "@sveltejs/kit";

export let POST = ({url}) => {
throw redirect(307, url.toString().replace("from", "to"))
}
3 changes: 3 additions & 0 deletions src/routes/to/+server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export let POST = ({url}) => {
return new Response("Posted!")
}
5 changes: 4 additions & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import adapter from '@sveltejs/adapter-auto';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: adapter()
adapter: adapter(),
csrf: {
checkOrigin: false
}
}
};

Expand Down

0 comments on commit f8d580e

Please sign in to comment.