adobe-apiplatform / apigateway

A Performant API Gateway based on NGINX and Openresty
MIT License
301 stars 57 forks source link

How to proxy HTTPS requests? #47

Closed coderluy closed 7 years ago

coderluy commented 7 years ago

I run apigateway w/o Marathon and Mesos. After I edited /etc/host and added the upstream entry manually into /etc/api-gateway/environment.conf.d/api-gateway-upstreams.http.conf

upstream microservice {  
 server microservice:8080 fail_timeout=10s;           
 keepalive 16;
}

I could access my microservice via http://microservice.api.localhost/.

However, I couldn't figure out a way to proxy HTTPs request to another service listening on port 443. Does apigateway support HTTPs access?

coderluy commented 7 years ago

Figured out how to do this with nginx configuration.


server {
...
  proxy_pass https://$server_name
}