How to switch to https from http in wso2 api microgateway when http2 protocol is getting used when talking to upstream backend services

46 views Asked by At

We have observed that when wso2 api microgateway uses http2 then it uses http scheme to connect to backend service.

scheme: http

is also adedd in the headers.

This is happening even when we are calling an https endpoint.

Why scheme is coming as http even if we are calling https downstream api?

Is there any way to change this scheme to https?

I am using 3.2.0 version of wso2 api microgateway

Or

Is there any way to switch off http2 just for a single backend service, while keeping it enabled for other service?

In wso2 api microgateway, there are configuration to switch off http2, but this will disable http2 for all the backend service connections.

https://mg.docs.wso2.com/en/latest/how-tos/http-2.0/

Upstream backend service HTTP2 configuration¶
By default communication with upstream clients over http2 is enabled. You can find the default configurations in the file <MICROGW_HOME>/conf/default-micro-gw.conf.template as below.`

[httpClients]
  //Enable http2 when connecting with upstream backend endpoints.
  enableHttp2 = true

Checked the debug logs from mgw, and confirmed from the header that scheme: http is getting added, and the request is getting received on port 80 (because of firewall layer)

So my questions :

  1. Is there any way to change this scheme to https when http2 is getting used?
  2. Is there any way to switch off http2 just for a single backend service, while keeping it enabled for other service?
  3. Why scheme is coming as http even if we are calling https downstream api?
0

There are 0 answers