File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
modules/common/clover/server/src Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,14 @@ import { normalize } from 'path';
1212
1313export class CustomResourceLoader extends ResourceLoader {
1414 constructor (
15- private readonly baseUrl : string ,
15+ readonly headers : Record < string , string | undefined | string [ ] > | undefined ,
1616 private readonly publicPath : string ,
17+ private readonly baseUrl : string ,
1718 private readonly fileCache : Map < string , Buffer > ,
1819 ) {
19- super ( ) ;
20+ super ( {
21+ userAgent : headers ?. [ 'user-agent' ] as string | undefined ,
22+ } ) ;
2023 }
2124
2225 fetch ( url : string , _options : FetchOptions ) : AbortablePromise < Buffer > | null {
Original file line number Diff line number Diff line change @@ -51,8 +51,9 @@ export class Engine {
5151 const inlineCriticalCss = options . inlineCriticalCss !== false ;
5252
5353 const customResourceLoader = new CustomResourceLoader (
54- origin ,
54+ options . headers ,
5555 options . publicPath ,
56+ origin ,
5657 this . resourceLoaderCache ,
5758 ) ;
5859
@@ -76,7 +77,6 @@ export class Engine {
7677 resources : customResourceLoader ,
7778 url : options . url ,
7879 referrer : options . headers ?. referrer as string | undefined ,
79- userAgent : options . headers ?. [ 'user-agent' ] as string | undefined ,
8080 beforeParse : ( window ) => {
8181 augmentWindowWithStubs ( window ) ;
8282 window . ngRenderMode = true ;
You can’t perform that action at this time.
0 commit comments