Skip to content

Commit

Permalink
fix(web api runtime): rely on default fetch init values
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Mar 5, 2022
1 parent 681c309 commit df6d966
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/runtime/browser/fetch_jwks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { FetchFunction } from '../interfaces.d'
import { JOSEError, JWKSTimeout } from '../../util/errors.js'
import { isCloudflareWorkers } from './env.js'

const fetchJwks: FetchFunction = async (url: URL, timeout: number) => {
let controller!: AbortController
Expand All @@ -17,14 +16,6 @@ const fetchJwks: FetchFunction = async (url: URL, timeout: number) => {
const response = await fetch(url.href, {
signal: controller ? controller.signal : undefined,
redirect: 'manual',
method: 'GET',
...(!isCloudflareWorkers()
? {
referrerPolicy: 'no-referrer',
credentials: 'omit',
mode: 'cors',
}
: undefined),
}).catch((err) => {
if (timedOut) throw new JWKSTimeout()
throw err
Expand Down

0 comments on commit df6d966

Please sign in to comment.