Skip to content

Commit

Permalink
ci: apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Feb 7, 2025
1 parent 10d27ff commit 66ecfb3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
7 changes: 4 additions & 3 deletions docs/traffic-policy/examples/add-authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Authentication Examples
sidebar_label: Authentication
---

import { JWTsRateLimiting } from "/traffic-policy/gallery/JWTsRateLimiting";
import { OAuthConditionalAccess } from "/traffic-policy/gallery/OAuthConditionalAccess";
import { OIDCIdentityToken } from "/traffic-policy/gallery/OIDCIdentityToken";
Expand All @@ -19,14 +20,14 @@ The following example adds key-based rate limiting to your endpoints based on yo
This example grants conditional access to a page using the following ngrok [OAuth action result variables](/traffic-policy/actions/oauth):

- `actions.ngrok.oauth.identity.email.endsWith('ngrok.com')`
- Checks the email address of the authorized user from the provider. In the example, if the email address's domain is `ngrok.com`, the user will be granted access to the page.
- Checks the email address of the authorized user from the provider. In the example, if the email address's domain is `ngrok.com`, the user will be granted access to the page.
- `actions.ngrok.oauth.identity.name`
- Gets the name of the authorized user from the provider. In this example, the name will be displayed in a welcome message or a rejection message depending on if the user is authenticated.
- Gets the name of the authorized user from the provider. In this example, the name will be displayed in a welcome message or a rejection message depending on if the user is authenticated.

<OAuthConditionalAccess />

## Sending an OIDC identity token over headers

This example uses the `actions.ngrok.oidc.identity_token` [OIDC action result variable](/traffic-policy/actions/oidc/#action-result-variables) to send the OIDC identity token over headers to the service at the endpoint.

<OIDCIdentityToken />
<OIDCIdentityToken />
1 change: 0 additions & 1 deletion docs/traffic-policy/examples/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Explore a curated collection of examples and configuration examples spanning fro

A number of these examples come from a longer article about how ngrok [makes policy management accessible](https://ngrok.com/blog-post/api-gateway-policy-management-examples) to developers, including a simple Go-based application for testing these and other configurations.


## Rate limit requests

### Rate limit for specific endpoint
Expand Down
6 changes: 3 additions & 3 deletions docs/traffic-policy/examples/route-requests.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ title: Route Request Example
sidebar_label: Route requests
---

import { BasedOnHeaders } from "@site/traffic-policy/gallery/route-requests/BasedOnHeaders";
import { BasedOnURL } from "@site/traffic-policy/gallery/route-requests/BasedOnURL";
import TabItem from "@theme/TabItem";
import Tabs from "@theme/Tabs";
import { BasedOnURL } from "@site/traffic-policy/gallery/route-requests/BasedOnURL";
import { BasedOnHeaders } from "@site/traffic-policy/gallery/route-requests/BasedOnHeaders";

You can use [CEL
interpolation](/docs/traffic-policy/concepts/cel-interpolation) to
Expand All @@ -32,4 +32,4 @@ The following example forwards requests from `https://*.example.com` to `https:/

The following example forwards requests containing a `X-Customer-Value: {CUSTOMER}` header to `https://{CUSTOMER}.internal`.

<BasedOnHeaders />
<BasedOnHeaders />

0 comments on commit 66ecfb3

Please sign in to comment.