Skip to content

Commit 01490df

Browse files
Lint fixes
1 parent 785cd97 commit 01490df

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

samples/dynamic-cors/README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ Implement dynamic, per-API CORS origin validation in Azure API Management using
1818

1919
Your organisation exposes multiple APIs through APIM. Different APIs serve different frontends:
2020

21-
| API | Allowed Origins | Rationale |
22-
| --- | --------------- | --------- |
23-
| **Products** | `https://shop.contoso.com`, `https://admin.contoso.com` | Only the shop and admin portals may call this API. |
24-
| **Analytics** | `https://dashboard.contoso.com` | Only the analytics dashboard may call this API. |
21+
| API | Allowed Origins | Rationale |
22+
| ------------- | -------------------------------------------------------- | --------------------------------------------------- |
23+
| **Products** | `https://shop.contoso.com`, `https://admin.contoso.com` | Only the shop and admin portals may call this API. |
24+
| **Analytics** | `https://dashboard.contoso.com` | Only the analytics dashboard may call this API. |
2525

2626
You need a single, reusable CORS mechanism that can be applied to any API while keeping the per-API origin configuration easy to maintain.
2727

@@ -48,26 +48,26 @@ This lab deploys all phases **side-by-side** so you can inspect and compare them
4848

4949
### Progression
5050

51-
| Phase | Policy | Mapping location | Trade-offs |
52-
| ----- | ------ | ---------------- | ---------- |
53-
| **Baseline** | Native `<cors>` | Static XML attribute list | Same origins for all APIs; cannot vary per API |
54-
| **Phase 1** | `DynamicCorsHardcoded` fragment | Inline `switch/case` in C# | Per-API control; requires redeploying the fragment to change origins |
55-
| **Phase 2** | `DynamicCorsNamedValues` fragment | JSON string in a Named Value | Updateable in the portal; **4,096-char limit** per Named Value |
56-
| **Phase 3** | `DynamicCorsCached` fragment + admin API | APIM internal cache | No size limit; updated via admin API; fail-closed when cache is empty; can swap to external Redis |
51+
| Phase | Policy | Mapping location | Trade-offs |
52+
| ------------ | ----------------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------- |
53+
| **Baseline** | Native `<cors>` | Static XML attribute list | Same origins for all APIs; cannot vary per API |
54+
| **Phase 1** | `DynamicCorsHardcoded` fragment | Inline `switch/case` in C# | Per-API control; requires redeploying the fragment to change origins |
55+
| **Phase 2** | `DynamicCorsNamedValues` fragment | JSON string in a Named Value | Updateable in the portal; **4,096-char limit** per Named Value |
56+
| **Phase 3** | `DynamicCorsCached` fragment + admin API | APIM internal cache | No size limit; updated via admin API; fail-closed when cache is empty; can swap to external Redis |
5757

5858
### Comparison Matrix
5959

60-
| Criterion | Baseline | Phase 1 | Phase 2 | Phase 3 |
61-
| -------------------------------------------- | :------: | :-----: | :-----: | :-----: |
62-
| Per-API origin control | - | + | + | + |
63-
| No fragment redeployment to change origins | + | - | + | + |
64-
| No size limit on origin mapping | + | + | - | + |
65-
| Zero additional infrastructure | + | + | + | - |
66-
| Update origins without Azure portal access | n/a | - | - | + |
67-
| Fail-closed when mapping is absent | n/a | n/a | n/a | + |
68-
| Observability (trace logging) | - | + | + | + |
69-
| Swap to external Redis without code changes | n/a | n/a | n/a | + |
70-
| Complexity | Low | Low | Low | Medium |
60+
| Criterion | Baseline | Phase 1 | Phase 2 | Phase 3 |
61+
| ------------------------------------------- | :------: | :-----: | :-----: | :-----: |
62+
| Per-API origin control | - | + | + | + |
63+
| No fragment redeployment to change origins | + | - | + | + |
64+
| No size limit on origin mapping | + | + | - | + |
65+
| Zero additional infrastructure | + | + | + | - |
66+
| Update origins without Azure portal access | n/a | - | - | + |
67+
| Fail-closed when mapping is absent | n/a | n/a | n/a | + |
68+
| Observability (trace logging) | - | + | + | + |
69+
| Swap to external Redis without code changes | n/a | n/a | n/a | + |
70+
| Complexity | Low | Low | Low | Medium |
7171

7272
**Legend:** `+` = advantage, `-` = limitation, `n/a` = not applicable to this approach.
7373

samples/load-balancing/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Samples: Load Balancing
22

3-
Sets up an APIM instance that demonstrates load balancing and circuit breaking across backends.
3+
Sets up an APIM instance that demonstrates load balancing and circuit breaking across backends.
44

55
⚙️ **Supported infrastructures**: apim-aca, afd-apim-pe
66

@@ -16,12 +16,12 @@ Sets up an APIM instance that demonstrates load balancing and circuit breaking a
1616

1717
This lab integrates into an existing Azure Container Apps architecture and sets up the following:
1818

19-
- One container app that serves multiple mock Web API endpoints returning 429 error codes.
19+
- One container app that serves multiple mock Web API endpoints returning 429 error codes.
2020
- Three separate backends are set up in APIM that each point to a different endpoint on this container app (e.g. /api/0, /api/1, etc.).
2121
- Four separate backend pool with varying load balancer setups are configured using these three backends.
2222

2323
## ⚙️ Configuration
2424

2525
1. Decide which of the [Infrastructure Architectures](../../README.md#infrastructure-architectures) you wish to use.
26-
1. If the infrastructure _does not_ yet exist, navigate to the desired [infrastructure](../../infrastructure/) folder and follow its README.md.
27-
1. If the infrastructure _does_ exist, adjust the `user-defined parameters` in the _Initialize notebook variables_ below. Please ensure that all parameters match your infrastructure.
26+
1. If the infrastructure *does not* yet exist, navigate to the desired [infrastructure](../../infrastructure/) folder and follow its README.md.
27+
1. If the infrastructure *does* exist, adjust the `user-defined parameters` in the *Initialize notebook variables* below. Please ensure that all parameters match your infrastructure.

0 commit comments

Comments
 (0)