https://storage.googleapis.com.
Credentials (HMAC access key + secret for a service account) are created the same way in both runtimes, see GCS Credentials.
Node (server-side)
Browser (presigned URLs)
GCSResource is secret-free, your backend signs each operation using your HMAC keys and hands back a URL. Since GCS accepts AWS Signature V4, the same @aws-sdk/s3-request-presigner code used for S3 works, pointed at the GCS endpoint.
1. Server: sign URLs with the GCS endpoint
2. Browser: wire it up
If you prefer Google’s native signer (Google-provided IAM-signed URLs via
@google-cloud/storage’s getSignedUrl), you can use it here too, the presigner contract only cares that the returned URL works with fetch(). Native signing avoids shipping HMAC keys to your backend.3. Configure CORS on the bucket
GCS rejects S3-flavoredPutBucketCors calls, its CORS schema differs. Use either the native XML API (via HMAC keys, same creds your presigner uses) or gsutil cors set.
Option A, helper script (no gcloud install):
The browser example ships a signer that crafts the GCS-shaped CORS XML and submits it via AWS SigV4 to https://storage.googleapis.com/<bucket>?cors:
gsutil: