From 011d72df5869320bfc5b66a62118f04fe3d9c2f3 Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 11 Jun 2025 11:04:05 -0600 Subject: fix: update authzd to allow access to css js assets --- pkg/authz/check_service.go | 3 +++ pkg/authz/server_test.go | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/pkg/authz/check_service.go b/pkg/authz/check_service.go index 641ba92..7057558 100644 --- a/pkg/authz/check_service.go +++ b/pkg/authz/check_service.go @@ -23,11 +23,14 @@ var public map[string]bool = map[string]bool{ "GET:/favicon.ico": true, "GET:/favicon.png": true, "GET:/health": true, + "GET:/htmx.js": true, "GET:/index.html": true, "GET:/logo.png": true, + "GET:/pico.min.css": true, "GET:/signout": true, "GET:/sparkle": true, "GET:/sparkles": true, + "GET:/vue.global.js": true, "POST:/sparkles/restore": true, } diff --git a/pkg/authz/server_test.go b/pkg/authz/server_test.go index e8f179e..9da2800 100644 --- a/pkg/authz/server_test.go +++ b/pkg/authz/server_test.go @@ -69,11 +69,15 @@ func TestServer(t *testing.T) { {status: codes.OK, http: &HTTPRequest{Method: "GET", Path: "/dashboard/nav"}}, {status: codes.OK, http: &HTTPRequest{Method: "GET", Path: "/favicon.ico"}}, {status: codes.OK, http: &HTTPRequest{Method: "GET", Path: "/favicon.png"}}, + {status: codes.OK, http: &HTTPRequest{Method: "GET", Path: "/favicon.png"}}, {status: codes.OK, http: &HTTPRequest{Method: "GET", Path: "/health"}}, + {status: codes.OK, http: &HTTPRequest{Method: "GET", Path: "/htmx.js"}}, {status: codes.OK, http: &HTTPRequest{Method: "GET", Path: "/index.html"}}, {status: codes.OK, http: &HTTPRequest{Method: "GET", Path: "/logo.png"}}, + {status: codes.OK, http: &HTTPRequest{Method: "GET", Path: "/pico.min.css"}}, {status: codes.OK, http: &HTTPRequest{Method: "GET", Path: "/signout"}}, {status: codes.OK, http: &HTTPRequest{Method: "GET", Path: "/sparkles"}}, + {status: codes.OK, http: &HTTPRequest{Method: "GET", Path: "/vue.global.js"}}, {status: codes.OK, http: &HTTPRequest{Method: "POST", Path: "/sparkles", Headers: loggedInHeaders}}, {status: codes.OK, http: &HTTPRequest{Method: "POST", Path: "/sparkles/restore"}}, {status: codes.PermissionDenied, http: &HTTPRequest{Method: "GET", Path: "/dashboard"}}, -- cgit v1.2.3