-
Notifications
You must be signed in to change notification settings - Fork 5k
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
[Rules] Snippets example to follow redirects from origin #18522
Conversation
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.
2 files reviewed, 1 total issue(s) found.
This template is ready for use and should fit most redirect-following scenarios. | ||
|
||
It ensures the Snippet transparently follows redirects issued by the origin server. | ||
The `fetch()` API’s `redirect: "follow"` option ensures automatic handling of `3xx` redirects, returning the final response. If the origin response is not a redirect, the original content is returned. |
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.
The `fetch()` API’s `redirect: "follow"` option ensures automatic handling of `3xx` redirects, returning the final response. If the origin response is not a redirect, the original content is returned. | |
The `fetch()` API's `redirect: "follow"` option ensures automatic handling of `3xx` redirects, returning the final response. If the origin response is not a redirect, the original content is returned. |
Issues:
- Style Guide - (cloudflare.NonStandardQuotes-warning) Use standard single quotes or double quotes only. Do not use any of the following quote mark types: ‘ ’ “ ”. In the text, we found this character: ’
Fix Explanation:
The issue identified is the use of a non-standard curly apostrophe ’ in the word "API’s". This should be replaced with a standard single quote ' to comply with the style guide. The rest of the text is correct, including the use of back-tick marks and double quotes around "follow".
6200dd6
to
a0ce968
Compare
Deploying cloudflare-docs with Cloudflare Pages
|
Files with changes (up to 15) |
Summary
Add example to Snippets gallery that shows how to modify the fetch request to follow redirects from the origin, ensuring the client receives the final response.