diff options
| author | mo khan <mo@mokhan.ca> | 2025-06-11 11:04:05 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-06-11 11:04:05 -0600 |
| commit | 011d72df5869320bfc5b66a62118f04fe3d9c2f3 (patch) | |
| tree | cca28bf6dadbb7d02771fe56a16053608a2a5d9f | |
| parent | f88ff319dfdff23364f490c05ae349a8cac6c7c2 (diff) | |
fix: update authzd to allow access to css js assets
| -rw-r--r-- | pkg/authz/check_service.go | 3 | ||||
| -rw-r--r-- | pkg/authz/server_test.go | 4 |
2 files changed, 7 insertions, 0 deletions
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"}}, |
