Tweak: whitelist custom.css from auth (#6986)

This commit is contained in:
shamoon
2026-08-14 23:52:46 -07:00
committed by GitHub
parent 58dadddb53
commit 27704f962e
4 changed files with 32 additions and 2 deletions
+2 -1
View File
@@ -33,7 +33,8 @@ export async function middleware(req) {
}
const pathname = new URL(req.url).pathname;
if (authEnabled && !pathname.startsWith("/api/healthcheck")) {
const isPublicAuthPath = pathname.startsWith("/api/healthcheck") || pathname === "/api/config/custom.css";
if (authEnabled && !isPublicAuthPath) {
// The MCP API handler authorizes both bearer tokens and Homepage sessions.
if (pathname === "/api/mcp") {
return withPrivateCache(NextResponse.next());