Azure webapp as backend with azure static webapp as frontend throws code:400 error
Bhanu Chander V
0
Reputation points
I've created azure webapp as backend and static webapp as frontend and when I tried to run backend I see the following message
I haven't added any authentication or AD to the apps. What could be the issue? In my backend app.py I've added CORS something like :
cors_origin = {
#"origin": get_origin,
"origin": "https://my_static_app.azurestaticapps.net/api", # or whatever port your frontend is using
"credentials": True,
"methods": ["POST", "GET", "PATCH", "HEAD", "PUT", "DELETE", "OPTIONS"],
"allow_headers": ['Content-type','Authorization','Origin','Access-Control-Allow-Origin','Accept','Options','X-Requested-With'],
"options_success_status": 200,
}
CORS(app, **cors_origin)
what could be the issue?
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,173 questions
Sign in to answer