From bb58f0308e527fb5a97bff184a35f48718797c64 Mon Sep 17 00:00:00 2001 From: Mo Date: Sat, 15 Jun 2024 16:30:26 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20CSP=20(#2840)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-workflow.yml | 2 +- .github/workflows/create-release-workflow.yml | 2 +- .github/workflows/pr-workflow.yml | 4 ++-- .github/workflows/test-workflow.yml | 2 +- server/src/main.ts | 9 +++++++-- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-workflow.yml b/.github/workflows/build-workflow.yml index db4cc2755..445533c5c 100644 --- a/.github/workflows/build-workflow.yml +++ b/.github/workflows/build-workflow.yml @@ -29,7 +29,7 @@ jobs: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout diff --git a/.github/workflows/create-release-workflow.yml b/.github/workflows/create-release-workflow.yml index 349956384..1311553ed 100644 --- a/.github/workflows/create-release-workflow.yml +++ b/.github/workflows/create-release-workflow.yml @@ -7,7 +7,7 @@ jobs: create-release: name: Create Release - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout diff --git a/.github/workflows/pr-workflow.yml b/.github/workflows/pr-workflow.yml index d732229b7..5d9205daf 100644 --- a/.github/workflows/pr-workflow.yml +++ b/.github/workflows/pr-workflow.yml @@ -12,7 +12,7 @@ jobs: name: ${{ matrix.command }} timeout-minutes: 60 - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout @@ -58,7 +58,7 @@ jobs: e2e: name: e2e tests - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/test-workflow.yml b/.github/workflows/test-workflow.yml index 70df49e8f..c807a0899 100644 --- a/.github/workflows/test-workflow.yml +++ b/.github/workflows/test-workflow.yml @@ -9,7 +9,7 @@ jobs: e2e: name: daily e2e tests timeout-minutes: 60 - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout diff --git a/server/src/main.ts b/server/src/main.ts index cc88c2d4b..abb959a87 100644 --- a/server/src/main.ts +++ b/server/src/main.ts @@ -92,8 +92,13 @@ const bootstrap = async () => { useDefaults: true, directives: { defaultSrc: [`'self'`, `blob:`, `data:`], - scriptSrc: [`'self'`, `blob:`, `https: 'unsafe-eval'`, `https: 'unsafe-inline'`], - connectSrc: [`'self'`, '*.viewtube.io'], + scriptSrc: [ + `'self'`, + `blob:`, + `https: 'unsafe-eval'`, + `https: 'unsafe-inline'`, + '*.viewtube.io' + ], scriptSrcAttr: null } }