From 6858f66a62416354a349d8090fcb45b5262056eb Mon Sep 17 00:00:00 2001 From: Sandro Date: Fri, 25 Apr 2025 19:38:02 +0200 Subject: Add check endpoint which can be used with nginx' auth_request function (#266) * Add check endpoint which can be used with nginx' auth_request function * feat(cmd): allow configuring redirect domains * test: add test environment for the nginx_auth PR This is a full local setup of the nginx_auth PR including HTTPS so that it's easier to validate in isolation. This requires an install of k3s (https://k3s.io) with traefik set to listen on localhost. This will be amended in the future but for now this works enough to ship it. Signed-off-by: Xe Iaso * fix(cmd|lib): allow empty redirect domains variable Signed-off-by: Xe Iaso * fix(test): add space to target variable in anubis container Signed-off-by: Xe Iaso * docs(admin): rewrite subrequest auth docs, make generic * docs(install): document REDIRECT_DOMAINS flag Signed-off-by: Xe Iaso * feat(lib): clamp redirects to the same HTTP host Only if REDIRECT_DOMAINS is not set. Signed-off-by: Xe Iaso --------- Signed-off-by: Xe Iaso Co-authored-by: Xe Iaso --- web/index.templ | 12 +++++++++++ web/index_templ.go | 63 +++++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 65 insertions(+), 10 deletions(-) (limited to 'web') diff --git a/web/index.templ b/web/index.templ index 818c6a5..4fdb4fc 100644 --- a/web/index.templ +++ b/web/index.templ @@ -126,6 +126,18 @@ templ errorPage(message string, mail string) { } +templ StaticHappy() { +
+ diff --git a/web/index_templ.go b/web/index_templ.go index def54ad..8286000 100644 --- a/web/index_templ.go +++ b/web/index_templ.go @@ -297,7 +297,7 @@ func errorPage(message string, mail string) templ.Component { }) } -func bench() templ.Component { +func StaticHappy() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { @@ -318,34 +318,77 @@ func bench() templ.Component { templ_7745c5c3_Var16 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "
TimeIters
Time AIters ATime BIters B

Loading...

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } -- cgit v1.2.3