Skip to content

Commit

Permalink
(storage) Fix default host (#7034)
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseLovelace committed Dec 13, 2019
1 parent 6fc415b commit 513ba6b
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -34,6 +34,7 @@ public class StorageOptions extends ServiceOptions<Storage, StorageOptions> {
private static final String API_SHORT_NAME = "Storage";
private static final String GCS_SCOPE = "https://www.googleapis.com/auth/devstorage.full_control";
private static final Set<String> SCOPES = ImmutableSet.of(GCS_SCOPE);
private static final String DEFAULT_HOST = "https://storage.googleapis.com";

public static class DefaultStorageFactory implements StorageFactory {

Expand Down Expand Up @@ -133,7 +134,7 @@ public static StorageOptions getUnauthenticatedInstance() {
@SuppressWarnings("unchecked")
@Override
public Builder toBuilder() {
return new Builder(this).setHost("storage.googleapis.com");
return new Builder(this).setHost(DEFAULT_HOST);
}

@Override
Expand All @@ -147,6 +148,6 @@ public boolean equals(Object obj) {
}

public static Builder newBuilder() {
return new Builder();
return new Builder().setHost(DEFAULT_HOST);
}
}

0 comments on commit 513ba6b

Please sign in to comment.