File tree 1 file changed +13
-6
lines changed
1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,12 @@ export function useStorageEmulator(
147
147
*/
148
148
export class StorageService implements _FirebaseService {
149
149
_bucket : Location | null = null ;
150
+ /**
151
+ * This string can be in the formats:
152
+ * - host
153
+ * - host:port
154
+ * - protocol://host:port
155
+ */
150
156
private _host : string = DEFAULT_HOST ;
151
157
protected readonly _appId : string | null = null ;
152
158
private readonly _requests : Set < Request < unknown > > ;
@@ -179,15 +185,16 @@ export class StorageService implements _FirebaseService {
179
185
}
180
186
181
187
/**
182
- * Set host:port string for this service.
183
- * @param origin - Origin string in the form of http://[host]:[port]
188
+ * Set host string for this service.
189
+ * @param host - host string in the form of host, host:port,
190
+ * or protocol://host:port
184
191
*/
185
- set host ( origin : string ) {
186
- this . _host = origin ;
192
+ set host ( host : string ) {
193
+ this . _host = host ;
187
194
if ( this . _url != null ) {
188
- this . _bucket = Location . makeFromBucketSpec ( this . _url , origin ) ;
195
+ this . _bucket = Location . makeFromBucketSpec ( this . _url , host ) ;
189
196
} else {
190
- this . _bucket = extractBucket ( origin , this . app . options ) ;
197
+ this . _bucket = extractBucket ( host , this . app . options ) ;
191
198
}
192
199
}
193
200
You can’t perform that action at this time.
0 commit comments