mirror of
https://github.com/gethomepage/homepage.git
synced 2026-09-29 07:21:16 -07:00
Tweak: whitelist custom.css from auth (#6986)
This commit is contained in:
+2
-1
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user