From a451608b72a0a942827f3377f7874b80000eb358 Mon Sep 17 00:00:00 2001 From: Peter Oettig Date: Mon, 23 Oct 2023 04:10:36 +0200 Subject: [PATCH 1/2] Fix that custom html headers and static assets got lost when converting a Caddyfile to JSON with `caddy adapt` --- caddyfile_authn_ui.go | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/caddyfile_authn_ui.go b/caddyfile_authn_ui.go index 41f999a..e2f7199 100644 --- a/caddyfile_authn_ui.go +++ b/caddyfile_authn_ui.go @@ -20,7 +20,6 @@ import ( "github.com/greenpau/caddy-security/pkg/util" "github.com/greenpau/go-authcrunch/pkg/authn" "github.com/greenpau/go-authcrunch/pkg/authn/ui" - "io/ioutil" "strings" ) @@ -130,19 +129,7 @@ func parseCaddyfileAuthPortalUI(h *caddyfile.Dispenser, repl *caddy.Replacer, po case strings.HasPrefix(args, "js"): portal.UI.CustomJsPath = strings.ReplaceAll(args, "js ", "") case strings.HasPrefix(args, "html header path"): - args = strings.ReplaceAll(args, "html header path ", "") - b, err := ioutil.ReadFile(args) - if err != nil { - return h.Errf("%s %s subdirective: %s %v", rootDirective, subDirective, args, err) - } - for k, v := range ui.PageTemplates { - headIndex := strings.Index(v, " Date: Sun, 3 Dec 2023 01:18:04 +0100 Subject: [PATCH 2/2] Sign CLA --- assets/cla/consent.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/cla/consent.yaml b/assets/cla/consent.yaml index 658cc62..2d6498a 100644 --- a/assets/cla/consent.yaml +++ b/assets/cla/consent.yaml @@ -27,3 +27,5 @@ email: devinmccode@protonmail.com - name: Freddy Heppell email: freddy@freddyheppell.com +- name: Peter Oettig + email: oss-cla@oettig.de