Skip to content

Devtools no longer support the style nonce for Content Security Policies #6284

@icf-mrankin

Description

@icf-mrankin

Describe the bug

The styleNonce prop has not been carried forward to the current version. If you have a content security policy in place for development, devtools will not load any inline CSS.

I tried to put together a codesandbox, but was unsuccessful. They don't seem to allow modifying the HTML headers. I'm not really surprised by that.

This appears to be a regression from this pull request: #3506

Your minimal, reproducible example

unable to recreate due to inability to manage html headers

Steps to reproduce

  1. Add a content security policy header for CSS that expects a nonce.
  2. Include the devtools in the app

Expected behavior

devtools appear and work similar to the 4.x version

How often does this bug happen?

None

Screenshots or Videos

Screenshot 2023-11-01 at 10 41 08 AM

Platform

  • OS: MacOS Ventura
  • Browser: Brave version 1.59.124 Chromium: 118.0.5993.117 (official build) (x86_64)

Tanstack Query adapter

react-query

TanStack Query version

5.4.3

TypeScript version

n/a

Additional context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions