need a help, lets say my api is deployed on aks.. my localhost fast api works fine with localhost webapp. but the deployed one is not working with localhost webapp due to cors issue. Added origin localhost to cors middleware, still no luck how to fix that
do you know why i have "blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status." on my "POST" request ?
need a help, lets say my api is deployed on aks.. my localhost fast api works fine with localhost webapp. but the deployed one is not working with localhost webapp due to cors issue. Added origin localhost to cors middleware, still no luck
how to fix that
What about csrf_tokens do these need to be handled also? I know in django it is quite easy with {% csrf_token %} but what about for fastapi?
do you know why i have "blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status." on my "POST" request ?
What is your CORS setup in FastAPI? From what port are you trying to access the backend?
did you solve it? i have the same issue right now
@@agnesHQ Using a Proxy server(Nginx, etc) will solve this issue.
For me, it shows the following : Unresolved attribute reference 'add_middleware' for class 'app'
Did you initialise app = FastAPI()?