-
Notifications
You must be signed in to change notification settings - Fork 89
Closed
Labels
api: storageIssues related to the googleapis/java-storage API.Issues related to the googleapis/java-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Milestone
Description
When generating a signed URL the following code snippet doesn't respect the Host supplied by StorageOptions.
Storage storage = StorageOptions.getDefaultInstance().toBuilder().setHost("http://example.com/").build().getService();
URL signedUrl = storage.signUrl(
state.getBlobInfo(),
1,
TimeUnit.HOURS,
SignUrlOption.httpMethod(HttpMethod.POST),
SignUrlOption.withExtHeaders(
ImmutableMap.of("x-goog-resumable", "start")),
SignUrlOption.signWith(c.getServiceAccountSigner()),
SignUrlOption.withV2Signature());
Edit to add:
When a custom endpoint is set on the client, Sign URLs and Post Policies should automatically use that domain.
Optional: allow users to set a custom hostname for Sign URL and Post policy methods
See: go/signurl-custom-endpoint-gcs
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the googleapis/java-storage API.Issues related to the googleapis/java-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.