소스 검색

Fix fetch referer

David Sehnal 6 년 전
부모
커밋
5699dca088
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/mol-plugin/context.ts

+ 1 - 1
src/mol-plugin/context.ts

@@ -58,7 +58,7 @@ export class PluginContext {
      * "static" access to resources.
      */
     async fetch(url: string, type: 'string' | 'binary' = 'string'): Promise<string | Uint8Array> {
-        const req = await fetch(url);
+        const req = await fetch(url, { referrerPolicy: 'origin-when-cross-origin' });
         return type === 'string' ? await req.text() : new Uint8Array(await req.arrayBuffer());
     }