-
Notifications
You must be signed in to change notification settings - Fork 84
Labels
api: storageIssues related to the googleapis/java-storage API.Issues related to the googleapis/java-storage API.
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!
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the googleapis/java-storage API.Issues related to the googleapis/java-storage API.