Skip to content

Commit

Permalink
Update interceptor.md
Browse files Browse the repository at this point in the history
  • Loading branch information
0fatal authored Nov 17, 2023
1 parent baa0b63 commit 6267264
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/en/guide/function/interceptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Only if the return value of the interceptor is `true`, the original cloud functi
Here is a simple interceptor example. If the IP is `111.111.111.111`, the original cloud function can be accessed:

```typescript
export async function main(ctx: FunctionContext) {
export default async function(ctx: FunctionContext) {
// Get the actual IP of the request
const ip = ctx.headers['x-forwarded-for']
if(ip === '111.111.111.111'){
Expand Down

0 comments on commit 6267264

Please sign in to comment.