fix(frontend): fixed cors
This commit is contained in:
parent
b5d47472d9
commit
23424fdfbc
@ -10,13 +10,16 @@ export function SimCurrentGear() {
|
|||||||
|
|
||||||
async function fetchSimResult(formData: FormData) {
|
async function fetchSimResult(formData: FormData) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch("http://127.0.0.1:8000/sim/current_gear", {
|
const response = await fetch(
|
||||||
|
"https://sim-free.dev-null.rocks/sim/current_gear",
|
||||||
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Access-Control-Allow-Origin": "*",
|
"Access-Control-Allow-Origin": "*",
|
||||||
},
|
},
|
||||||
body: formData,
|
body: formData,
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`Error! status: ${response.status}`);
|
throw new Error(`Error! status: ${response.status}`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user