From 924c62c7b2163e41e9bf3ff10b3e10211e54f82c Mon Sep 17 00:00:00 2001 From: Merilynn Bandy <31383109+furudean@users.noreply.github.com> Date: Sat, 21 May 2022 11:43:39 -0600 Subject: [PATCH 1/4] remove handling of floc --- documentation/docs/14-configuration.md | 13 ------------- packages/kit/src/core/build/build_server.js | 1 - packages/kit/src/core/config/index.spec.js | 1 - packages/kit/src/core/config/options.js | 2 -- packages/kit/src/core/dev/plugin.js | 1 - packages/kit/src/runtime/server/page/render.js | 4 ---- packages/kit/test/apps/basics/test/test.js | 6 ------ packages/kit/test/apps/options/svelte.config.js | 1 - packages/kit/test/apps/options/test/test.js | 8 -------- packages/kit/types/index.d.ts | 1 - packages/kit/types/internal.d.ts | 1 - 11 files changed, 39 deletions(-) diff --git a/documentation/docs/14-configuration.md b/documentation/docs/14-configuration.md index ac2053fcb6fc..4835378a02e7 100644 --- a/documentation/docs/14-configuration.md +++ b/documentation/docs/14-configuration.md @@ -38,7 +38,6 @@ const config = { serviceWorker: 'src/service-worker', template: 'src/app.html' }, - floc: false, inlineStyleThreshold: 0, methodOverride: { parameter: '_method', @@ -149,18 +148,6 @@ An object containing zero or more of the following `string` values: - `serviceWorker` — the location of your service worker's entry point (see [Service workers](/docs/service-workers)) - `template` — the location of the template for HTML responses -### floc - -Google's [FLoC](https://github.com/WICG/floc) is a technology for targeted advertising that the [Electronic Frontier Foundation](https://www.eff.org/) has deemed [harmful](https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea) to user privacy. [Browsers other than Chrome](https://www.theverge.com/2021/4/16/22387492/google-floc-ad-tech-privacy-browsers-brave-vivaldi-edge-mozilla-chrome-safari) have declined to implement it. - -In common with services like [GitHub Pages](https://github.blog/changelog/2021-04-27-github-pages-permissions-policy-interest-cohort-header-added-to-all-pages-sites/), SvelteKit protects your users by automatically opting out of FLoC. It adds the following header to responses unless `floc` is `true`: - -``` -Permissions-Policy: interest-cohort=() -``` - -> This only applies to server-rendered responses — headers for prerendered pages (e.g. created with [adapter-static](https://github.com/sveltejs/kit/tree/master/packages/adapter-static)) are determined by the hosting platform. - ### inlineStyleThreshold Inline CSS inside a `