fastify / fastify/help

Support for http/1.1 fallback support while supporting http/2?

Open
#890 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
68
Forks
8
Avg merge
11h 2m
Merged PRs (30d)
2

Description

#### What are you trying to achieve, or the steps to reproduce?

I am trying to understand if it is possible to maintain a single Fastify server that allows for HTTP/2 requests, but also supports falling back and responding to HTTP/1.1 requests. I care about this mostly in the context of building a platform-agnostic API.

I have tried enabling http/2:

```js
// Wrap code in markdown source tags
const fastify = require('fastify')({
http2: true
})
```

But consistently get a `Error: Unsupported Protocol` error when attempting to also enable HTTP/1 requests.

#### Context

* *node version*: 19
* *fastify version*: 4.17
* *os*: Mac
* *any other relevant information*: Running off of Cloud Run (locally via Cloud Code)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.