Skip to content

Commit 905e44c

Browse files
committed
Update frontend to send code as JSON for CORS compatibility
1 parent 70fca45 commit 905e44c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ <h2 class="text-xl font-semibold mb-2">Output (Enter your ngrok URL at the botto
9393

9494
const response = await fetch(ngrokBaseUrl, {
9595
method: "POST",
96-
body: code,
96+
body: JSON.stringify({ code: code }),
9797
headers: {
98-
"Content-Type": "text/plain",
98+
"Content-Type": "application/json",
9999
"Accept": "text/plain"
100100
},
101101
mode: "cors"

0 commit comments

Comments
 (0)