ai cooking
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

go back to clearing urls on redirect (#234)

authored by

Paul Miller and committed by
GitHub
aabeb63a 0caf3528

+1 -7
+1 -1
internal/recipes/server.go
··· 518 518 519 519 func redirectToHash(w http.ResponseWriter, r *http.Request, hash string, useStart bool) { 520 520 u := url.URL{Path: "/recipes"} 521 - args := r.URL.Query() 521 + args := url.Values{} // intentioanlly clear other args 522 522 args.Set(queryArgHash, hash) 523 523 if useStart { 524 524 args.Set(queryArgStart, time.Now().Format(time.RFC3339Nano))
-6
internal/recipes/server_test.go
··· 91 91 if got := u.Query().Get("h"); got != hash { 92 92 t.Fatalf("expected redirect hash %q, got %q", hash, got) 93 93 } 94 - if got := u.Query().Get("mail"); got != "true" { 95 - t.Fatalf("expected mail=true to be preserved, got %q", got) 96 - } 97 - if got := u.Query().Get("start"); got != "2026-01-25T00:00:00Z" { 98 - t.Fatalf("expected start to be preserved, got %q", got) 99 - } 100 94 } 101 95 102 96 type noSessionAuth struct{}