Description
Hello!
I am having a very similar issue as in #1094, however it is just the protocol of the host which is not respected. In the example below I specify "http://example.com" but the signed url is towards "https://example.com". I don't know enough about this topic to know if https is required, for local development we are using http so I have to replace the protocol when signing urls locally towards a fake gcs server https://github.com/fsouza/fake-gcs-server. Let me know!
Environment details
- Running on Ubuntu 24.04.1 LTS
- Java version 21
- com.google.cloud:libraries-bom, version = "26.52.0"
Code example
Storage storage = StorageOptions.getDefaultInstance().toBuilder().setHost("http://example.com/").build().getService();
BlobInfo blobInfo = BlobInfo.newBuilder(BlobId.of("bucket", "object")).build()
URL signedUrl = storage.signUrl(
blobInfo,
1,
TimeUnit.HOURS,
SignUrlOption.signWith(credentials),
SignUrlOption.withV4Signature());
Produces a signed url which starts with:
https://example.com/bucket/object?X-Goog-Algorithm=...
Thanks!