This website requires JavaScript.
Explore
Help
Register
Sign In
oadmin
/
new-api
Watch
1
Star
0
Fork
0
You've already forked new-api
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
Files
bb5e032dd2d14198cb767841aa72f2c46abcb240
new-api
/
constant
/
context_key.go
6 lines
79 B
Go
Raw
Normal View
History
Unescape
Escape
feat: Introduce settings package and refactor constants - Added a new `setting` package to replace the `constant` package for configuration management, improving code organization and clarity. - Moved various configuration variables such as `ServerAddress`, `PayAddress`, and `SensitiveWords` to the new `setting` package. - Updated references throughout the codebase to use the new `setting` package, ensuring consistent access to configuration values. - Introduced new files for managing chat settings and midjourney settings, enhancing modularity and maintainability of the code.
2024-12-22 17:24:29 +08:00
package
constant
feat: Add request start time context key and update middleware - Introduced a new constant `ContextKeyRequestStartTime` to store the request start time in the context, enhancing request tracking. - Updated the `Distribute` middleware to set the request start time in the context using the new constant. - Modified the `GenRelayInfo` function to retrieve the request start time from the context, ensuring accurate timing information is used in relay operations.
2024-12-23 20:48:10 +08:00
const
(
ContextKeyRequestStartTime
=
"request_start_time"
)
Reference in New Issue
Copy Permalink