deepspace 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.js CHANGED
@@ -206,7 +206,9 @@ function createScopedR2Handler(config) {
206
206
  { status: 400, headers: CORS_HEADERS }
207
207
  );
208
208
  }
209
- const scope = url.searchParams.get("scope") || "self";
209
+ const isKeyedGet = subpath !== "" && request.method === "GET";
210
+ const defaultScope = isKeyedGet ? "app" : "self";
211
+ const scope = url.searchParams.get("scope") || defaultScope;
210
212
  const result = config.resolvePrefix(scope, { userId: auth.userId, url });
211
213
  if (!result.prefix) {
212
214
  const errorMsg = result.error ?? "Invalid scope";