mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-24 00:56:39 +00:00
fix: enable double slashes for optional path variables
Closes #754 This implementation is flawed, it's making the pass-challenge route return 404s. I'm not entirely sure why this is happening, but I'm pushing this for now in case there's some low hanging fruit. Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/TecharoHQ/anubis/lib/localization"
|
||||
"github.com/TecharoHQ/anubis/web"
|
||||
"github.com/a-h/templ"
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
//go:generate go tool github.com/a-h/templ/cmd/templ generate
|
||||
@@ -21,7 +22,7 @@ func init() {
|
||||
|
||||
type Impl struct{}
|
||||
|
||||
func (i *Impl) Setup(mux *http.ServeMux) {}
|
||||
func (i *Impl) Setup(r *mux.Router) {}
|
||||
|
||||
func (i *Impl) Issue(r *http.Request, lg *slog.Logger, in *challenge.IssueInput) (templ.Component, error) {
|
||||
u, err := r.URL.Parse(anubis.BasePrefix + "/.within.website/x/cmd/anubis/api/pass-challenge")
|
||||
|
||||
Reference in New Issue
Block a user