You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-reference-python.md
+5-32Lines changed: 5 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -625,42 +625,15 @@ from os import listdir
625
625
626
626
We recommend that you maintain your tests in a folder separate from the project folder. This keeps you from deploying test code with your app.
627
627
628
-
## Known issues and FAQ
629
-
630
-
All known issues and feature requests are tracked using [GitHub issues](https://github.com/Azure/azure-functions-python-worker/issues) list. If you run into a problem and can't find the issue in GitHub, open a new issue and include a detailed description of the problem.
631
-
632
-
### Cross-origin resource sharing
633
-
634
-
Azure Functions supports cross-origin resource sharing (CORS). CORS is configured [in the portal](functions-how-to-use-azure-function-app-settings.md#cors) and through the [Azure CLI](/cli/azure/functionapp/cors). The CORS allowed origins list applies at the function app level. With CORS enabled, responses include the `Access-Control-Allow-Origin` header. For more information, see [Cross-origin resource sharing](functions-how-to-use-azure-function-app-settings.md#cors).
635
-
636
-
The allowed origins list [isn't currently supported](https://github.com/Azure/azure-functions-python-worker/issues/444) for Python function apps. Because of this limitation, you must expressly set the `Access-Control-Allow-Origin` header in your HTTP functions, as shown in the following example:
Azure Functions supports cross-origin resource sharing (CORS). CORS is configured [in the portal](functions-how-to-use-azure-function-app-settings.md#cors) and through the [Azure CLI](/cli/azure/functionapp/cors). The CORS allowed origins list applies at the function app level. With CORS enabled, responses include the `Access-Control-Allow-Origin` header. For more information, see [Cross-origin resource sharing](functions-how-to-use-azure-function-app-settings.md#cors).
643
631
644
-
# Set the headers in the response.
645
-
return func.HttpResponse(
646
-
f"Allowed origin '{headers}'.",
647
-
headers=headers, status_code=200
648
-
)
649
-
```
632
+
CORS is fully supported for Python function apps.
650
633
651
-
Make sure that you also update your function.json to support the OPTIONS HTTP method:
652
-
653
-
```json
654
-
...
655
-
"methods": [
656
-
"get",
657
-
"post",
658
-
"options"
659
-
]
660
-
...
661
-
```
634
+
## Known issues and FAQ
662
635
663
-
This HTTP method is used by web browsers to negotiate the allowed origins list.
636
+
All known issues and feature requests are tracked using [GitHub issues](https://github.com/Azure/azure-functions-python-worker/issues) list. If you run into a problem and can't find the issue in GitHub, open a new issue and include a detailed description of the problem.
0 commit comments