Skip to content

Commit 08efa05

Browse files
fix: skip quota checks in public mode
Public mode serves flat directories without pod structure, so quota checks would fail trying to find pod-specific .quota.json files.
1 parent 6762eb4 commit 08efa05

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/handlers/container.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ export async function handlePost(request, reply) {
112112
}
113113
}
114114

115-
// Check storage quota before writing
116-
const podName = getPodName(request);
115+
// Check storage quota before writing (skip in public mode - no pod structure)
116+
const podName = request.config?.public ? null : getPodName(request);
117117
if (podName) {
118118
const { allowed, error } = await checkQuota(podName, content.length, request.defaultQuota || 0);
119119
if (!allowed) {

src/handlers/resource.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,8 @@ export async function handlePut(request, reply) {
608608
}
609609
}
610610

611-
// Check storage quota before writing
612-
const podName = getPodName(request);
611+
// Check storage quota before writing (skip in public mode - no pod structure)
612+
const podName = request.config?.public ? null : getPodName(request);
613613
const oldSize = stats?.size || 0;
614614
const sizeDelta = content.length - oldSize;
615615

0 commit comments

Comments
 (0)