auto backend protocol for HTTP/HTTPS (#6985)

* add auto backend protocol for HTTP/HTTPS

* e2e test for AUTO_HTTP backend protocol

* unit  test for AUTO_HTTP backend protocol

Co-authored-by: Luca Del Monte <luca.delmonte5@gmail.com>
This commit is contained in:
Dmitry Kuleshov 2021-07-29 22:49:19 +03:00 committed by GitHub
parent b1f9f83810
commit a327a809d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 96 additions and 16 deletions

View file

@ -617,6 +617,8 @@ func buildProxyPass(host string, b interface{}, loc interface{}) string {
proxyPass := "proxy_pass"
switch location.BackendProtocol {
case "AUTO_HTTP":
proto = "$scheme://"
case "HTTPS":
proto = "https://"
case "GRPC":