Skip to content

Commit 196a4ab

Browse files
authored
Merge pull request #2040 from opencloud-eu/http2
allow http2 connections to proxy
2 parents 3ea736c + 79a0fe0 commit 196a4ab

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

.woodpecker.star

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,7 @@ def wopiValidatorTests(ctx, storage, wopiServerType, accounts_hash_difficulty =
12311231
"commands": [
12321232
"curl -v -X PUT '%s/remote.php/webdav/test.wopitest' -k --fail --retry-connrefused --retry 7 --retry-all-errors -u admin:admin -D headers.txt" % OC_URL,
12331233
"cat headers.txt",
1234-
"export FILE_ID=$(cat headers.txt | sed -n -e 's/^.*Oc-Fileid: //p')",
1234+
"export FILE_ID=$(cat headers.txt | sed -n -e 's/^.*oc-fileid: //Ip')",
12351235
"export URL=\"%s/app/open?app_name=FakeOffice&file_id=$FILE_ID\"" % OC_URL,
12361236
"export URL=$(echo $URL | tr -d '[:cntrl:]')",
12371237
"curl -v -X POST \"$URL\" -k --fail --retry-connrefused --retry 7 --retry-all-errors -u admin:admin > open.json",

devtools/deployments/opencloud_full/docker-compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ services:
1919
- "--entryPoints.http.http.redirections.entryPoint.to=https"
2020
- "--entryPoints.http.http.redirections.entryPoint.scheme=https"
2121
- "--entryPoints.https.address=:443"
22+
# http2 optimizations
23+
- "--entryPoints.https.http2.maxConcurrentStreams=512"
24+
- "--serversTransport.maxIdleConnsPerHost=100"
25+
# allow self signed certificate from OpenCloud
26+
- "--serversTransport.insecureSkipVerify=true"
2227
# change default timeouts for long-running requests
2328
# this is needed for webdav clients that do not support the TUS protocol
2429
- "--entryPoints.https.transport.respondingTimeouts.readTimeout=12h"

devtools/deployments/opencloud_full/opencloud.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ services:
2525
OC_LOG_COLOR: "${LOG_PRETTY:-false}"
2626
OC_LOG_PRETTY: "${LOG_PRETTY:-false}"
2727
# do not use SSL between Traefik and OpenCloud
28-
PROXY_TLS: "false"
28+
PROXY_TLS: "true"
2929
# make the REVA gateway accessible to the app drivers
3030
GATEWAY_GRPC_ADDR: 0.0.0.0:9142
3131
# INSECURE: needed if OpenCloud / Traefik is using self generated certificates
@@ -72,6 +72,7 @@ services:
7272
- "traefik.http.routers.opencloud.tls.certresolver=http"
7373
- "traefik.http.routers.opencloud.service=opencloud"
7474
- "traefik.http.services.opencloud.loadbalancer.server.port=9200"
75+
- "traefik.http.services.opencloud.loadbalancer.server.scheme=https"
7576
logging:
7677
driver: ${LOG_DRIVER:-local}
7778
restart: always

pkg/service/http/service.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ func NewService(opts ...Option) (Service, error) {
4949
}
5050
tlsConfig := &tls.Config{
5151
Certificates: []tls.Certificate{cert},
52+
MinVersion: tls.VersionTLS12,
53+
NextProtos: []string{"h2", "http/1.1"},
5254
}
5355
mServer = mhttps.NewServer(server.TLSConfig(tlsConfig))
5456
} else {

0 commit comments

Comments
 (0)