Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
tako0614 committed Feb 20, 2024
1 parent 73f0729 commit 23d52fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion islands/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export default function RegisterForm({ text, color,tako }: { text: string, color
};
const handleSubmit = async (event: JSX.TargetedEvent<HTMLFormElement, Event>) => {
event.preventDefault();
const token = await fetch("http://localhost:8000/api/token?origin=http://localhost:8000")
const uri = new URL(window.location.href);
const token = await fetch(`${uri.protocol}//${uri.hostname}/api/token?origin=${uri.protocol}//${uri.hostname}`)
const csrftoken = await token.json();
const data = {
requirements: "temp_register",
Expand Down

0 comments on commit 23d52fb

Please sign in to comment.