Longer fields to support Google TLD's

Created on 20 July 2023, over 1 year ago

Problem/Motivation

Google suggests adding all of their TLD's to the CSP header for Google Analytics 4 with Signals.
See "For Google Analytics 4 (Google Analytics) deployments using Google Signals, the CSP must include the following directives:" at https://developers.google.com/tag-platform/tag-manager/csp

Proposed resolution

Increase the size of img-src and connect-src directives.

The Google TLD's themselves currently take up 4017 characters.
Maybe a field size of 5120 (1024*5) will work for most folks to account for any additional domains they may need to configure?

NOTE: In our setup, img's are not being requested, so we are looking to only add these domains to connect-src.
Adding Google's TLD's to both img-src and connect-src as Google suggests will make for a large header size. Apache for example supports a header size up to 8KB by default, so setting both can be problematic.

For a current list of Google's TLD's see https://www.google.com/supported_domains

For Drupal 9/10 see https://www.drupal.org/project/seckit/issues/3285493 .

Feature request
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

🇨🇦Canada djac

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024