Add a target edit form with headers and timeout fields (closes #127) (#229)
Some checks failed
check / check (push) Failing after 2m59s

This commit was merged in pull request #229.
This commit is contained in:
2026-08-20 07:24:12 +02:00
parent c6a9884f86
commit aba02bc509
11 changed files with 1764 additions and 44 deletions

View File

@@ -214,6 +214,20 @@ func (s *Server) setupSourceRoutes() {
s.h.HandleEntrypointToggle(),
)
r.Post("/targets", s.h.HandleTargetCreate())
// The edit form is the one page that renders a target's
// destination URL and header values in full; see
// delivery.TargetConfigForm. It belongs to this group for
// its RequireAuth and NoCache, which are what keep that
// exception from reaching an unauthenticated request or a
// shared cache.
r.Get(
"/targets/{targetID}/edit",
s.h.HandleTargetEdit(),
)
r.Post(
"/targets/{targetID}/edit",
s.h.HandleTargetEditSubmit(),
)
r.Post(
"/targets/{targetID}/delete",
s.h.HandleTargetDelete(),