Add support for HTTPS and H2C app protocols - #420
ItalyPaleAle wants to merge 3 commits into
Conversation
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #420 +/- ##
==========================================
- Coverage 69.17% 68.07% -1.11%
==========================================
Files 34 34
Lines 2735 2800 +65
==========================================
+ Hits 1892 1906 +14
- Misses 734 784 +50
- Partials 109 110 +1
☔ View full report in Codecov by Sentry. |
|
wait for related PRs merged. |
Which PR? The runtime features are merged |
|
validation isn't passing. |
|
Can you re-trigger it please? It's been a while since it ran |
|
Doesn't seem to be a way to re-trigger.. i'll reopen. |
…tocol Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
|
Uhm I don't understand what's causing the tests to fail. Everything is working fine, but the failure is here: Which is trying to kill a process and it fails, after having already stopped Dapr? |
| mux: router, | ||
| if opts.Protocol == "" { | ||
| // If there's no user-defined protocol, try reading from the APP_PROTOCOL env var | ||
| opts.Protocol = common.ServiceProtocol(os.Getenv(common.AppProtocolEnvVar)) |
There was a problem hiding this comment.
Consider using http.NoBody or a more explicit timeout configuration if needed, but 30 * time.Second is acceptable for ReadHeaderTimeout as a baseline.
This PR adds support to create a
servicethat uses HTTPS (incl. HTTP/2) or H2C (HTTP/2 Cleartext). Using HTTP/2 should offer significant performance improvements, for example due to support for multiplexing.http.NewServiceWithOptionswhich allows creating a service with options, including configuring the protocol explicitly ("https", "http", "h2c") and passing TLS certificatesAPP_PROTOCOL(see Inject APP_PROTOCOL in app containers dapr#6512 and Add APP_PROTOCOL env var for app cli#1318) is present, uses that to detect HTTPS or H2C usage