[Vuejs]-Why does this API call return [object Promise]?

0👍

Okay got it fixed now.

I had too add to the fastapi python-file:

from fastapi.middleware.cors import CORSMiddleware

app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)

And yes, I know that using a wildcard is not good practice.

Leave a comment