mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-20 15:31:24 +02:00
fix: optimize memory usage, fix agent and code refactor (#118)
* refactor: simplify io code and make utils module independent * fix(docker): agent and socket-proxy docker event flushing with modified reverse proxy handler * refactor: remove unused code * refactor: remove the use of logging module in most code * refactor: streamline domain mismatch check in certState function * tweak: use ecdsa p-256 for autocert * fix(tests): update health check tests for invalid host and add case for port in host * feat(acme): custom acme directory * refactor: code refactor and improved context and error handling * tweak: optimize memory usage under load * fix(oidc): restore old user matching behavior * docs: add ChatGPT assistant to README --------- Co-authored-by: yusing <yusing@6uo.me>
This commit is contained in:
@@ -18,7 +18,7 @@ func GetLastVersion() Version {
|
||||
|
||||
func GetVersionHTTPHandler() http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte(GetVersion().String()))
|
||||
fmt.Fprint(w, GetVersion().String())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,16 +34,16 @@ func init() {
|
||||
// lastVersion = ParseVersion(lastVersionStr)
|
||||
// }
|
||||
// if err != nil && !os.IsNotExist(err) {
|
||||
// logging.Warn().Err(err).Msg("failed to read version file")
|
||||
// log.Warn().Err(err).Msg("failed to read version file")
|
||||
// return
|
||||
// }
|
||||
// if err := f.Truncate(0); err != nil {
|
||||
// logging.Warn().Err(err).Msg("failed to truncate version file")
|
||||
// log.Warn().Err(err).Msg("failed to truncate version file")
|
||||
// return
|
||||
// }
|
||||
// _, err = f.WriteString(version)
|
||||
// if err != nil {
|
||||
// logging.Warn().Err(err).Msg("failed to save version file")
|
||||
// log.Warn().Err(err).Msg("failed to save version file")
|
||||
// return
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user