File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,13 @@ export class Saturn {
308
308
}
309
309
310
310
let fallbackCount = 0
311
- const nodes = this . nodes
311
+ let nodes = this . nodes
312
+ if ( opts . firstHitDNS ) {
313
+ nodes = [
314
+ { url : this . config . cdnURL } ,
315
+ ...nodes
316
+ ]
317
+ }
312
318
for ( let i = 0 ; i < nodes . length ; i ++ ) {
313
319
if ( fallbackCount > this . config . fallbackLimit || skipNodes || upstreamController ?. signal . aborted ) {
314
320
break
Original file line number Diff line number Diff line change 24
24
* @property {string } [jwt] - JWT for L1 request.
25
25
* @property {number } [connectTimeout=5000] - Connection timeout in milliseconds.
26
26
* @property {number } [downloadTimeout=0] - Download timeout in milliseconds.
27
- * @property {AbortController } [controller]
27
+ * @property {AbortController } [controller] - Abort controller
28
+ * @property {boolean } [firstHitDNS] - First request hit is always to CDN origin.
28
29
*/
29
30
30
31
export { }
You can’t perform that action at this time.
0 commit comments