Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
tako0614 committed Feb 20, 2024
1 parent 152ed69 commit f217815
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routes/api/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ export const handler = {
if(allow.includes(origin)){
const csrftoken = generateRandomString(128)
await client.execute(`INSERT INTO csrftoken VALUES (default,default,"${csrftoken}");`)
console.log(aaaaa)
return new Response(JSON.stringify({"csrftoken": csrftoken}), {
headers: { "Content-Type": "application/json",
"Access-Control-Allow-Origin": origin
},
}
);
}else {
console.log(a)
return new Response(JSON.stringify({"csrftoken": "This origin is not allowed"}), {
headers: { "Content-Type": "application/json",
"Access-Control-Allow-Origin": origin
Expand Down

0 comments on commit f217815

Please sign in to comment.