Skip to content

Commit d2b604f

Browse files
committed
changeset
1 parent 4b4a66f commit d2b604f

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

.changeset/khaki-numbers-nail.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@firebase/auth': minor
3+
'@firebase/util': minor
4+
'firebase': minor
5+
---
6+
7+
Suppress the use of the `fetch` parameter `referrPolicy` within Auth for `fetch` requests originating from Cloudflare Workers. Clouldflare Worker environments do not support this parameter and throw when it's used.

common/api-review/util.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@ export function isBrowser(): boolean;
264264
// @public (undocumented)
265265
export function isBrowserExtension(): boolean;
266266

267-
// Warning: (ae-missing-release-tag) "isCloudflareRunner" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
267+
// Warning: (ae-missing-release-tag) "isCloudflareWorker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
268268
//
269269
// @public
270-
export function isCloudflareRunner(): boolean;
270+
export function isCloudflareWorker(): boolean;
271271

272272
// Warning: (ae-missing-release-tag) "isElectron" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
273273
//

packages/auth/src/api/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { FirebaseError, isCloudflareRunner, querystring } from '@firebase/util';
18+
import { FirebaseError, isCloudflareWorker, querystring } from '@firebase/util';
1919

2020
import { AuthErrorCode, NamedErrorParams } from '../core/errors';
2121
import {
@@ -154,7 +154,7 @@ export async function _performApiRequest<T, V>(
154154
...body
155155
};
156156

157-
if (!isCloudflareRunner()) {
157+
if (!isCloudflareWorker()) {
158158
Object.assign(fetchArgs, {
159159
refererPolicy: 'no-referrer'
160160
});

packages/util/src/environment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ export function isWebWorker(): boolean {
100100
}
101101

102102
/**
103-
* Detect Cloudflare Runner context.
103+
* Detect Cloudflare Worker context.
104104
*/
105-
export function isCloudflareRunner(): boolean {
105+
export function isCloudflareWorker(): boolean {
106106
return (
107107
typeof navigator !== 'undefined' &&
108108
navigator.userAgent === 'Cloudflare-Workers'

0 commit comments

Comments
 (0)