@cloudflare/sandbox 0.12.9 → 0.12.10

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.
@@ -5916,6 +5916,10 @@ function isBucketRootProbe(request, realPath, url, bucket) {
5916
5916
  const method = request.method.toUpperCase();
5917
5917
  return (method === "GET" || method === "HEAD") && url.search === "" && getObjectKeyForPath(realPath, bucket) === "";
5918
5918
  }
5919
+ function isBucketRootMutation(request, realPath, bucket) {
5920
+ const method = request.method.toUpperCase();
5921
+ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && getObjectKeyForPath(realPath, bucket) === "";
5922
+ }
5919
5923
  function deleteDirectoryMarkerCacheEntry(mountId, realPath) {
5920
5924
  directoryMarkerCache.delete(getDirectoryMarkerCacheKey(mountId, realPath));
5921
5925
  }
@@ -6039,6 +6043,7 @@ const s3CredentialProxyHandler = async (request, env$1, ctx) => {
6039
6043
  }
6040
6044
  const realUrl = new URL(realPath + (url.search || ""), mount.endpoint);
6041
6045
  if (isBucketRootProbe(request, realPath, url, mount.bucket)) return new Response(null, { status: 200 });
6046
+ if (isBucketRootMutation(request, realPath, mount.bucket)) return new Response("Method Not Allowed", { status: 405 });
6042
6047
  if (!isRequestWithinMountScope(realPath, url, mount.bucket, mount.prefix)) return new Response("Forbidden: request is outside mounted bucket scope", { status: 403 });
6043
6048
  const copySourceError = validateCopySourceWithinMountScope(request.headers, mount.bucket, mount.prefix);
6044
6049
  if (copySourceError) return copySourceError;
@@ -7180,7 +7185,7 @@ function createTunnelsHandler(host) {
7180
7185
  * This file is auto-updated by .github/changeset-version.ts during releases
7181
7186
  * DO NOT EDIT MANUALLY - Changes will be overwritten on the next version bump
7182
7187
  */
7183
- const SDK_VERSION = "0.12.9";
7188
+ const SDK_VERSION = "0.12.10";
7184
7189
 
7185
7190
  //#endregion
7186
7191
  //#region src/sandbox.ts
@@ -11561,4 +11566,4 @@ var Sandbox = class Sandbox extends Container {
11561
11566
 
11562
11567
  //#endregion
11563
11568
  export { PortClient as A, InvalidBackupConfigError as B, collectFile as C, SandboxClient as D, isPlatformTransientError as E, BackupCreateError as F, SessionTerminatedError as G, ProcessExitedBeforeReadyError as H, BackupExpiredError as I, BackupNotFoundError as L, FileClient as M, CommandClient as N, UtilityClient as O, BackupClient as P, BackupRestoreError as R, validateTunnelName as S, isDurableObjectCodeUpdateReset as T, ProcessReadyTimeoutError as U, OperationInterruptedError as V, RPCTransportError as W, responseToAsyncIterable as _, PREVIEW_PROXY_HEADER as a, sanitizeSandboxId as b, PREVIEW_PROXY_SANDBOX_ID_HEADER as c, BucketUnmountError as d, InvalidMountConfigError as f, parseSSEStream as g, asyncIterableToSSEStream as h, proxyTerminal as i, GitClient as j, ProcessClient as k, PREVIEW_PROXY_TOKEN_HEADER as l, S3FSMountError as m, Sandbox as n, PREVIEW_PROXY_HEADERS as o, MissingCredentialsError as p, getSandbox as r, PREVIEW_PROXY_PORT_HEADER as s, ContainerProxy$1 as t, BucketMountError as u, CodeInterpreter as v, streamFile as w, validatePort as x, SandboxSecurityError as y, ContainerUnavailableError as z };
11564
- //# sourceMappingURL=sandbox-D0rNqxlr.js.map
11569
+ //# sourceMappingURL=sandbox-Co2NYKhX.js.map