-2

I have a nodejs based web app that uses http2 library of nodejs. I start my app

HTTP/2 server is listening on port 3000. PID: 238718.

and want to check app's homepage: http://localhost:3000/

I have an error in Chrome browser: ERR_INVALID_HTTP_RESPONSE

I know that Chrome uses HTTP/2 over TLS (HTTPS).

Does any possibility exist to use HTTP/2 w/o HTTPS in a browsers?

Alex Gusev
  • 1,526
  • 3
  • 16
  • 35
  • 2
    Does this answer your question? [Why do web browsers not support h2c (HTTP/2 without TLS)?](https://stackoverflow.com/questions/46788904/why-do-web-browsers-not-support-h2c-http-2-without-tls) – Rob Jul 21 '21 at 09:40

1 Answers1

1

Does HTTP/2 require encryption? No. After extensive discussion, the Working Group did not have consensus to require the use of encryption (e.g., TLS) for the new protocol.

However, some implementations have stated that they will only support HTTP/2 when it is used over an encrypted connection, and currently no browser supports HTTP/2 unencrypted.

Source: https://http2.github.io/faq/#does-http2-require-encryption

Note that you can just use a self signed certificate for local development

David Mulder
  • 26,123
  • 9
  • 51
  • 114