Skip to content

Commit

Permalink
No need to check http log instance
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkRunWu committed Dec 15, 2023
1 parent c4d3181 commit 3c263ea
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/handler/site/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,8 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {

h.logger.Debug("resolved site", zap.String("site", handler.ID()))
entry := middleware.GetLogEntry(r)
if entry != nil {
e := entry.(*httputil.LogEntry)
e.Logger = e.Logger.With(zap.String("site", handler.ID()))
}
e := entry.(*httputil.LogEntry)
e.Logger = e.Logger.With(zap.String("site", handler.ID()))

if err := h.checkAuthz(r, handler); err != nil {
http.NotFound(w, r)
Expand Down

0 comments on commit 3c263ea

Please sign in to comment.