Skip to content

Commit

Permalink
Update doc.md (#288)
Browse files Browse the repository at this point in the history
* Update doc.md

* Update doc.md
  • Loading branch information
joshtwist authored Dec 18, 2023
1 parent 0b6ffe5 commit bb966a9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions policies/custom-code-outbound/doc.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
## Writing A Policy
:::tip
The outbound policy will only execute if the response status code is 'ok'
(e.g. `response.ok === true` or the status code is 200-299) - see
[response.ok on MDN](https://developer.mozilla.org/en-US/docs/Web/API/Response/ok).
:::

### Writing A Policy

Custom policies can be written to extend the functionality of your gateway. This
document is about outbound policies that can intercept the request and, if
Expand Down Expand Up @@ -99,7 +105,7 @@ that same instance you must first `clone()` to avoid runtime errors such as

:::

## Adding headers
### Adding headers

Note if you just need to add headers, it more efficient not read the body stream
and reuse it, e.g.
Expand Down

1 comment on commit bb966a9

@vercel
Copy link

@vercel vercel bot commented on bb966a9 Dec 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./

docs.zuplopreview.net
docs.zuplo.site
docs-git-main.zuplopreview.net

Please sign in to comment.