/logs.json and /health URLs do not work if log prefix is /

Aperta Adatta ai principianti
#75 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
api, backend

Direzione di ricerca

Inizia leggendo la configurazione del gestore HTTP modificata nel commit 71b4f80 e segui come il gestore per log del prefisso radice interagisce con le route /logs.json e /health. Riproduci gli errori 404 con un prefisso di log /, poi verifica che entrambi gli URL rispondano correttamente mentre le route per log continuano a funzionare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

We are getting HTTP 404 Not Found responses for /logs.json and /health URLs on our monitoring servers with Skylight v0.10.1.

Our log prefix is / and it seems that go http ServerMux prefers per-log HandleFunc with specified host and / path over global /logs.json and /health HandleFuncs. If logs have non-root prefix path, there is no conflict between per-log and global HandleFuncs, but there is if log prefix path is /.

I think this regression is introduced in v0.9.0 with commit 71b4f80 (cmd/skylight: implement c2sp.org/tlog-mirror read path) where ServerMux handlers got reworked. Before that HandleFunc patterns were more specific and not conflicted with /logs.json and /health, but with a per-log HandleFunc multiplexer the common per-log path became / in our case and that became more specific that /logs.json and /health.

Lingua principale
Go
Stelle
318
Fork
32
Merge medio
5m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di FiloSottile/sunlight

Tutte le issue di FiloSottile/sunlight

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.