-
-
Notifications
You must be signed in to change notification settings - Fork 3
feat: handle 307 and 308 redirect status codes #38
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
Conversation
|
WalkthroughThe HTTP redirect status codes handled in the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant Fetch
participant Server
Caller->>Fetch: fetch(url)
Fetch->>Server: HTTP request
Server-->>Fetch: HTTP response (status 301/302/307/308 with Location)
alt Redirect status and Location header present
Fetch->>Fetch: fetch(new Location URL) (recursive)
else Non-redirect or no Location
Fetch-->>Caller: Return response
end
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/index.tsOops! Something went wrong! :( ESLint: 9.30.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@1stg/eslint-config' imported from /eslint.config.mjs 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (12)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Important
Looks good to me! 👍
Reviewed everything up to 6092ba5 in 1 minute and 7 seconds. Click for details.
- Reviewed
16
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
2
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/index.ts:29
- Draft comment:
Consider using an array with .includes() for cleaner redirect status checks. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
2. src/index.ts:35
- Draft comment:
Consider resolving relative redirect URLs and imposing a max redirect limit to avoid potential infinite recursion. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_z1Z7TCitbXXnfo4N
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Signed-off-by: JounQin <admin@1stg.me>
Signed-off-by: JounQin <admin@1stg.me>
commit: |
Summary
Changes
We've already handled 301 and 302, so it will be fine!
Important
Add support for HTTP 307 and 308 redirect status codes in
fetch()
insrc/index.ts
.fetch()
insrc/index.ts
to handle HTTP 307 and 308 status codes in addition to 301 and 302.This description was created by
for 6092ba5. You can customize this summary. It will automatically update as commits are pushed.
Summary by CodeRabbit