-
Notifications
You must be signed in to change notification settings - Fork 47
Adding timezone info to request header #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
…mezone info Signed-off-by: Daniel Wang <[email protected]>
Signed-off-by: Daniel Wang <[email protected]>
Signed-off-by: Zhongxuan (Daniel) Wang <[email protected]>
|
Caution Review failedThe pull request is closed. WalkthroughAdded an X-Timezone header to the outbound request in pages/api/chat.ts, using Intl.DateTimeFormat().resolvedOptions().timeZone with a fallback to 'Etc/UTC'. No other request structure or exported/public signatures changed. Changes
Sequence Diagram(s)sequenceDiagram
participant C as Client
participant A as API Route (pages/api/chat.ts)
participant S as Chat Completion Service
C->>A: POST /api/chat (request)
note over A: Determine timezone via Intl.DateTimeFormat().resolvedOptions().timeZone<br/>Fallback: 'Etc/UTC'
A->>S: Forward request with headers<br/>... X-Timezone: <timezone>
S-->>A: Response
A-->>C: Response
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
✨ Finishing Touches
🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Description
Added a new header option that includes the requester's device's timezone, in IANA format. This resonates with PR #660 for the NAT main repo.
By Submitting this PR I confirm:
Summary by CodeRabbit