Skip to content

Commit 16e23d6

Browse files
Resolve conflict.
2 parents 39317a1 + a5dec34 commit 16e23d6

File tree

8 files changed

+218
-46
lines changed

8 files changed

+218
-46
lines changed

articles/aks/ingress-basic.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ To control image versions, you'll want to import them into your own Azure Contai
7272

7373
```azurecli
7474
REGISTRY_NAME=<REGISTRY_NAME>
75-
SOURCE_REGISTRY=k8s.gcr.io
75+
SOURCE_REGISTRY=registry.k8s.io
7676
CONTROLLER_IMAGE=ingress-nginx/controller
7777
CONTROLLER_TAG=v1.2.1
7878
PATCH_IMAGE=ingress-nginx/kube-webhook-certgen
@@ -92,7 +92,7 @@ To control image versions, you'll want to import them into your own Azure Contai
9292
```azurepowershell-interactive
9393
$RegistryName = "<REGISTRY_NAME>"
9494
$ResourceGroup = (Get-AzContainerRegistry | Where-Object {$_.name -eq $RegistryName} ).ResourceGroupName
95-
$SourceRegistry = "k8s.gcr.io"
95+
$SourceRegistry = "registry.k8s.io"
9696
$ControllerImage = "ingress-nginx/controller"
9797
$ControllerTag = "v1.2.1"
9898
$PatchImage = "ingress-nginx/kube-webhook-certgen"

articles/api-management/TOC.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,6 @@
240240
href: backends.md
241241
- name: Automate API deployments
242242
href: /azure/architecture/example-scenario/devops/automated-api-deployments-apiops?toc=%2Fazure%2Fapi-management%2Ftoc.json&bc=/azure/api-management/breadcrumb/toc.json
243-
- name: Test and monitor APIs in Postman
244-
href: export-api-postman.md
245-
displayName: collection
246243
- name: Cache
247244
items:
248245
- name: Add caching to improve performance
@@ -358,8 +355,17 @@
358355
href: developer-portal-alternative-processes-self-host.md
359356
- name: Test self-hosted portal
360357
href: developer-portal-testing.md
361-
- name: Export APIs to the Power Platform
362-
href: export-api-power-platform.md
358+
- name: Export APIs
359+
items:
360+
- name: Test and monitor APIs in Postman
361+
href: export-api-postman.md
362+
displayName: collection
363+
- name: Export APIs to the Power Platform
364+
items:
365+
- name: Export API as custom connector
366+
href: export-api-power-platform.md
367+
- name: Enable CORS to test custom connector
368+
href: enable-cors-power-platform.md
363369
- name: Monitor APIs
364370
items:
365371
- name: Get API analytics

articles/api-management/check-header-policy.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,13 @@ Use the `check-header` policy to enforce that a request has a specified HTTP he
4141
| value | Add one or more of these elements to specify allowed HTTP header values. When multiple `value` elements are specified, the check is considered a success if any one of the values is a match. | No |
4242

4343

44+
45+
46+
4447
## Usage
4548

46-
- [**Policy sections:**](./api-management-howto-policies.md#sections) inbound, outbound
47-
- [**Policy scopes:**](./api-management-howto-policies.md#scopes) global, product, API, operation
49+
- **[Policy sections:](./api-management-howto-policies.md#sections)** inbound
50+
- **[Scopes:](./api-management-howto-policies.md#scopes)** global, product, API, operation
4851
- [**Gateways:**](api-management-gateways-overview.md) dedicated, consumption, self-hosted
4952

5053
## Example
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: Enable CORS policies to test Azure API Management custom connector
3+
description: How to enable CORS policies in Azure API Management and Power Platform to test a custom connector from Power Platform applications.
4+
services: api-management
5+
author: dlepow
6+
7+
ms.service: api-management
8+
ms.topic: how-to
9+
ms.date: 03/24/2023
10+
ms.author: danlep
11+
12+
---
13+
# Enable CORS policies to test custom connector from Power Platform
14+
Cross-origin resource sharing (CORS) is an HTTP-header based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources. Customers can add a [CORS policy](cors-policy.md) to their web APIs in Azure API Management, which adds cross-origin resource sharing support to an operation or an API to allow cross-domain calls from browser-based clients.
15+
16+
If you've exported an API from API Management as a [custom connector](export-api-power-platform.md) in the Power Platform and want to use the Power Apps or Power Automate test console to call the API, you need to configure your API to explicitly enable cross-origin requests from Power Platform applications. This article shows you how to configure the following two necessary policy settings:
17+
18+
* Add a CORS policy to your API
19+
20+
* Add a policy to your custom connector that sets an Origin header on HTTP requests
21+
22+
## Prerequisites
23+
24+
+ Complete the following quickstart: [Create an Azure API Management instance](get-started-create-service-instance.md)
25+
+ Export an API from your API Management instance to a Power Platform environment as a [custom connector](export-api-power-platform.md)
26+
27+
## Add CORS policy to API in API Management
28+
29+
Follow these steps to configure the CORS policy in API Management.
30+
31+
1. Sign into [Azure portal](https://portal.azure.com) and go to your API Management instance.
32+
1. In the left menu, select **APIs** and select the API that you exported as a custom connector. If you want to, select only an API operation to apply the policy to.
33+
1. In the **Policies** section, in the **Inbound processing** section, select **+ Add policy**.
34+
1. Select **Allow cross-origin resource sharing (CORS)**.
35+
1. Add the following **Allowed origin**: `https://make.powerapps.com`.
36+
1. Select **Save**.
37+
38+
* For more information about configuring a policy, see [Set or edit policies](set-edit-policies.md).
39+
* For details about the CORS policy, see the [cors](cors-policy.md) policy reference.
40+
41+
> [!NOTE]
42+
> If you already have an existing CORS policy at the service (all APIs) level to enable the test console of the developer portal, you can add the `https://make.powerapps.com` origin to that policy instead of configuring a separate policy for the API or operation.
43+
44+
> [!NOTE]
45+
> Depending on how the custom connector gets used in Power Platform applications, you might need to configure additional origins in the CORS policy. If you experience CORS problems when running Power Platform applications, use developer tools in your browser, tracing in API Management, or Application Insights to investigate the issues.
46+
47+
48+
## Add policy to custom connector to set Origin header
49+
50+
Add the following policy to your custom connector in your Power Platform environment. The policy sets an Origin header to match the CORS origin you allowed in API Management.
51+
52+
For details about editing settings of a custom connector, see [Create a custom connector from scratch](/connectors/custom-connectors/define-blank).
53+
54+
1. Sign in to Power Apps or Power Automate.
55+
1. On the left pane, select **Data** > **Custom Connectors**.
56+
1. Select your connector from the list of custom connectors.
57+
1. Select the pencil (Edit) icon to edit the custom connector.
58+
1. Select **3. Definition**.
59+
1. In **Policies**, select **+ New policy**. Select or enter the following policy details.
60+
61+
62+
|Setting |Value |
63+
|---------|---------|
64+
|Name | A name of your choice, such as **set-origin-header** |
65+
|Template | **Set HTTP header** |
66+
|Header name | **Origin** |
67+
|Header value | `https://make.powerapps.com` (same URL that you configured in API Management) |
68+
|Action if header exists | **override** |
69+
|Run policy on | **Request** |
70+
71+
:::image type="content" source="media/enable-cors-power-platform/cors-policy-power-platform.png" alt-text="Screenshot of creating policy in Power Platform custom connector to set an Origin header in HTTP requests.":::
72+
73+
1. Select **Update connector**.
74+
75+
1. After setting the policy, go to the **5. Test** page to test the custom connector.
76+
77+
## Next steps
78+
79+
* [Learn more about the Power Platform](https://powerplatform.microsoft.com/)
80+
* [Learn more about creating and using custom connectors](/connectors/custom-connectors/)

articles/api-management/export-api-power-platform.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ author: dlepow
66

77
ms.service: api-management
88
ms.topic: how-to
9-
ms.date: 08/12/2022
9+
ms.date: 03/24/2023
1010
ms.author: danlep
11+
ms.custom: engagement-fy23
1112

1213
---
1314
# Export APIs from Azure API Management to the Power Platform
@@ -19,7 +20,7 @@ This article walks through the steps in the Azure portal to create a custom Powe
1920
## Prerequisites
2021

2122
+ Complete the following quickstart: [Create an Azure API Management instance](get-started-create-service-instance.md)
22-
+ Make sure there is an API in your API Management instance that you'd like to export to the Power Platform
23+
+ Make sure there's an API in your API Management instance that you'd like to export to the Power Platform
2324
+ Make sure you have a Power Apps or Power Automate [environment](/powerapps/powerapps-overview#power-apps-for-admins)
2425

2526
## Create a custom connector to an API
@@ -37,7 +38,7 @@ This article walks through the steps in the Azure portal to create a custom Powe
3738

3839
:::image type="content" source="media/export-api-power-platform/create-custom-connector.png" alt-text="Create custom connector to API in API Management":::
3940

40-
Once the connector is created, navigate to your [Power Apps](https://make.powerapps.com) or [Power Automate](https://make.powerautomate.com) environment. You will see the API listed under **Data > Custom Connectors**.
41+
Once the connector is created, navigate to your [Power Apps](https://make.powerapps.com) or [Power Automate](https://make.powerautomate.com) environment. You'll see the API listed under **Data > Custom Connectors**.
4142

4243
:::image type="content" source="media/export-api-power-platform/custom-connector-power-app.png" alt-text="Custom connector in Power Platform":::
4344

@@ -48,10 +49,9 @@ You can manage your custom connector in your Power Apps or Power Platform enviro
4849
1. Select your connector from the list of custom connectors.
4950
1. Select the pencil (Edit) icon to edit and test the custom connector.
5051

51-
> [!NOTE]
52-
> To call the API from the Power Apps test console, you need to add the `https://make.powerautomate.com` URL as an origin to the [CORS policy](cors-policy.md) in your API Management instance.
52+
> [!IMPORTANT]
53+
> To call the API from the Power Apps test console, you need to configure a CORS policy in your API Management instance and create a policy in the custom connector to set an Origin header in HTTP requests. For more information, see [Enable CORS policies to test custom connector from Power Platform](enable-cors-power-platform.md).
5354
>
54-
> Depending on how the custom connector gets used when running Power Apps, you might need to configure additional origins in the CORS policy. You can use developer tools in your browser, tracing in API Management, or Application Insights to investigate CORS issues when running Power Apps.
5555
5656
## Update a custom connector
5757

128 KB
Loading

articles/application-gateway/application-gateway-faq.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ sections:
7676
```
7777
7878
For HTTP/2 connections to the frontend IP address on Application Gateway v2 SKU, the idle timeout is set to 180 seconds and is non-configurable.
79+
80+
- question: Does Application Gateway reuse the TCP connection that is established with backend server?
81+
answer: Yes. Application Gateway reuses the existing TCP connections with backend server.
7982

8083
- question: Can I rename my Application Gateway resource?
8184
answer: No. There's no way to rename an Application Gateway resource. You must create a new resource with a different name.

0 commit comments

Comments
 (0)