Skip to content

Make use of CSP nonce for GA scripts #1649

@jaydonkrooss

Description

@jaydonkrooss

After the quick fix required for Umich consent banner with google analytics (#1646), I discovered that we had to temporarily drop the use of CSP nonce to keep GA tracking functional in production.

The CSP nonce environment variable was added in previous versions of google analytics in this application (#1371). Ideally, for security, we should utilize CSP nonce when calling any inline scripts and re-enable it in production.

Additionally, investigate whether "unsafe-inline" is still necessary for script-src, as mentioned in this comment from that original issue.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions