diff --git a/build-scripts/gulp/gather-static.js b/build-scripts/gulp/gather-static.js index d1b5ff0090..3d80035e17 100644 --- a/build-scripts/gulp/gather-static.js +++ b/build-scripts/gulp/gather-static.js @@ -104,7 +104,10 @@ gulp.task("compress-static", () => compressStatic(paths.static)); gulp.task("copy-static-demo", (done) => { // Copy app static files - fs.copySync(polyPath("public"), paths.demo_root); + fs.copySync( + polyPath("public/static"), + path.resolve(paths.demo_root, "static") + ); // Copy demo static files fs.copySync(path.resolve(paths.demo_dir, "public"), paths.demo_root); diff --git a/cast/public/_headers b/cast/public/_headers new file mode 100644 index 0000000000..1f191e2720 --- /dev/null +++ b/cast/public/_headers @@ -0,0 +1,20 @@ +/* + Cache-Control: public, max-age: 0, s-maxage=3600, must-revalidate + Content-Security-Policy: form-action https: + Feature-Policy: vibrate 'none'; geolocation 'none'; midi 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'; speaker 'none'; vibrate 'none'; payment 'none' + Referrer-Policy: no-referrer-when-downgrade + X-Content-Type-Options: nosniff + X-Frame-Options: DENY + X-XSS-Protection: 1; mode=block + +/images/* + Cache-Control: public, max-age: 604800, s-maxage=604800 + +/manifest.json + Cache-Control: public, max-age: 3600, s-maxage=3600 + +/frontend_es5/* + Cache-Control: public, max-age: 604800, s-maxage=604800 + +/frontend_latest/* + Cache-Control: public, max-age: 604800, s-maxage=604800 diff --git a/demo/public/_headers b/demo/public/_headers new file mode 100644 index 0000000000..1a4137c675 --- /dev/null +++ b/demo/public/_headers @@ -0,0 +1,18 @@ +/* + Cache-Control: public, max-age: 0, s-maxage=3600, must-revalidate + Content-Security-Policy: form-action https: + Referrer-Policy: no-referrer-when-downgrade + X-Content-Type-Options: nosniff + X-XSS-Protection: 1; mode=block + +/api/* + Cache-Control: public, max-age: 604800, s-maxage=604800 + +/assets/* + Cache-Control: public, max-age: 604800, s-maxage=604800 + +/frontend_es5/* + Cache-Control: public, max-age: 604800, s-maxage=604800 + +/frontend_latest/* + Cache-Control: public, max-age: 604800, s-maxage=604800