From e4c7307c9937bbc8fb08eef3c54ad09b7beb0ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Mon, 14 Apr 2025 17:05:31 -0700 Subject: [PATCH] Fix CORS error when loading fonts in 2c (#3163) --- .github/workflows/deploy-preview.yaml | 4 ++-- packages/gitbook/public/_headers | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-preview.yaml b/.github/workflows/deploy-preview.yaml index 1b26e1679..156c1cfec 100644 --- a/.github/workflows/deploy-preview.yaml +++ b/.github/workflows/deploy-preview.yaml @@ -200,7 +200,7 @@ jobs: name: Visual Testing v2 (Cloudflare) needs: deploy-v2-cloudflare timeout-minutes: 10 - if: startsWith(github.head_ref || github.ref_name, 'cloudflare/') + if: startsWith(github.head_ref || github.ref_name, 'cloudflare/') || github.ref == 'refs/heads/main' steps: - name: Checkout uses: actions/checkout@v4 @@ -263,7 +263,7 @@ jobs: name: Visual Testing Customers v2 (Cloudflare) needs: deploy-v2-cloudflare timeout-minutes: 8 - if: startsWith(github.head_ref || github.ref_name, 'cloudflare/') + if: startsWith(github.head_ref || github.ref_name, 'cloudflare/') || github.ref == 'refs/heads/main' steps: - name: Checkout uses: actions/checkout@v4 diff --git a/packages/gitbook/public/_headers b/packages/gitbook/public/_headers index a33b320cf..0d7eadbf4 100644 --- a/packages/gitbook/public/_headers +++ b/packages/gitbook/public/_headers @@ -3,3 +3,5 @@ /~gitbook/static/* cache-control: public,max-age=31536000,immutable Access-Control-Allow-Origin: * +/_next/static/* + Access-Control-Allow-Origin: *