diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 06493e41..e42d44f1 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -33,7 +33,9 @@ jobs: env: CONTEXT: deploy-preview NETLIFY: true - run: yarn build + run: | + yarn build + cp ./custom-headers/_previewHeaders ./build/_headers - name: Deploy to Netlify uses: jsmrcaga/action-netlify-deploy@v2.0.0 diff --git a/custom-headers/_productionHeaders b/custom-headers/_productionHeaders deleted file mode 100644 index 908d835c..00000000 --- a/custom-headers/_productionHeaders +++ /dev/null @@ -1,14 +0,0 @@ -/* - X-Frame-Options: SAMEORIGIN - X-XSS-Protection: 0 - X-Content-Type-Options: nosniff - Content-Security-Policy: frame-src 'self' app.netlify.com *.demo.questdb.io *.questdb.io www.youtube.com www.slideshare.net forms.hsforms.com; - -/static/* - Cache-Control: public, max-age=31536000, immutable - -*.js - Cache-Control: public, max-age=31536000, immutable - -*.css - Cache-Control: public, max-age=31536000, immutable \ No newline at end of file diff --git a/netlify.toml b/netlify.toml index 6acc2eef..a4d42b8c 100644 --- a/netlify.toml +++ b/netlify.toml @@ -665,9 +665,3 @@ to = "/:splat" status = 200 force = true conditions = {Context = "deploy-preview"} - -[context.production] -command = "npm run build && cp ./custom-headers/_productionHeaders ./build/_headers" - -[context.deploy-preview] -command = "npm run build && cp ./custom-headers/_previewHeaders ./build/_headers"