-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mandy/api gw getting started #1014
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @DevMandy! Amazing work here! I've tested all your code/rules, and everything works as expected, which is awesome. Great demos.
Aside from these, just a few higher-order things to think about. These could definitely be a follow-up improvement and not a blocker for you!
- I think we need some type of conclusion here. The way it ends is a bit... arresting? Some links to other documentation, or even the API-G+K8s guide, would be great.
- You use a few different variables and formats to discuss the user's ngrok domain. I'd love if you just stuck with
{YOUR_NGROK_DOMAIN}
throughout, without thengrok.app
part, so that folks can choose which path works best for them and your variable usage remains consistent. - I'd love if our guides were consistent with terminology. From my understanding of the spec, the correct term for the configuration in the
policies.yaml
file is rules.
Signed-off-by: Russ Savage <[email protected]>
Resolves ngrok-private/ngrok#33865
Update example and url for endpoints to include TCP and TLS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more thing I missed before!
:::note | ||
You must always include the `forward-internal` action as the final step in your policy file since once it executes, | ||
no subsequent policy rules will be executed. Additionally, you always need a terminating policy rule. | ||
In this case, the traffic forwards to `https://v2.api.internal` if the header is set to a value other than `1` or `2` or | ||
if the header isn't present in the request. | ||
::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and in the other notes about having to end with a forward-internal
action is not quite accurate.
The traffic policy validation (for cloud endpoints) forces you to have some action implemented that is guaranteed to do something with traffic on your endpoints. This could be forward-internal
but this could also be deny
or custom-response
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's totally true! I'll update these warnings to be more technically accurate. Thanks for the feedback, Rachel.
No description provided.