Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid character in header content ["Content-Security-Policy"] #6497

Open
andreadellacorte opened this issue Apr 5, 2024 · 0 comments
Open
Labels
type: bug code to address defects in shipped code

Comments

@andreadellacorte
Copy link

Describe the bug

Hi, I am trying to run npx netlify serve and I am running into the following issue:

`TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Content-Security-Policy"]
at ServerResponse.setHeader (node:_http_outgoing:706:3)
at file:///Users/andrea.dellacorte/Documents/Github/techinterview.coach/node_modules/netlify-cli/dist/utils/proxy.js:455:21
at Array.forEach ()
at ProxyServer. (file:///Users/andrea.dellacorte/Documents/Github/techinterview.coach/node_modules/netlify-cli/dist/utils/proxy.js:453:42)
at ProxyServer.emit (/Users/andrea.dellacorte/Documents/Github/techinterview.coach/node_modules/netlify-cli/node_modules/eventemitter3/index.js:183:35)
at ClientRequest. (/Users/andrea.dellacorte/Documents/Github/techinterview.coach/node_modules/netlify-cli/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js:173:27)
at ClientRequest.emit (node:events:519:28)
at ClientRequest.emit (node:domain:488:12)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:698:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)

System:
OS: macOS 14.4.1
CPU: (8) arm64 Apple M1
Binaries:
Node: 21.7.2 - /opt/homebrew/bin/node
npm: 10.5.1 - /opt/homebrew/bin/npm
Browsers:
Chrome: 123.0.6312.107
Safari: 17.4.1`

Steps to reproduce

  1. Run npx netlify serve
  2. Wait for the console to fail

Configuration

No response

Environment

System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M1
    Memory: 148.27 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.7.2 - /opt/homebrew/bin/node
    npm: 10.5.1 - /opt/homebrew/bin/npm
  npmPackages:
    netlify-cli: ^17.21.2 => 17.21.2
@andreadellacorte andreadellacorte added the type: bug code to address defects in shipped code label Apr 5, 2024
@andreadellacorte andreadellacorte changed the title Please replace with a clear and descriptive title Invalid character in header content ["Content-Security-Policy"] Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

1 participant