vmware-archive / dispatch

Dispatch is a framework for deploying and managing serverless style applications.
http://dispatchframework.io
Apache License 2.0
532 stars 58 forks source link

Invalid G/W port in API path #738

Closed neosab closed 5 years ago

neosab commented 5 years ago

Bug Report

I am seeing an invalid port in the API path. This must be the g/w's tls port 443

root@null [ ~/dispatch ]# dispatch get api
     NAME    | FUNCTION | PROTOCOL | METHOD | DOMAIN |                 PATH                  | AUTH | STATUS | ENABLED
------------------------------------------------------------------------------------------------------------------------
  post-hello | hello-py | https    | POST   |        | https://localhost:8444/dispatch/hello |      | READY  | true
------------------------------------------------------------------------------------------------------------------------

Impact

Possible solution

Your Environment

neosab commented 5 years ago

cc @kars7e @zimengyang

pzmrzy commented 5 years ago

@neosab Here is the reason, In #709 the api gateway port is read from dispatch config file. but in the ova, the file don't contain api-https-port and api-http-port, so it show as default api gateway port 8444 and 8081. So I think we should modify the config file

neosab commented 5 years ago

@pzmrzy Why is the server reading from config file? It must be reading from the --gateway-tls-port 443 flag right

pzmrzy commented 5 years ago

Yes, the server read the flag, but client read the config file When do dispatch get api, the server return only the relative url. The port is been add in the client side

neosab commented 5 years ago

I missed that the URL is constructed by the client. Yup, in that case, we should fix the config file in the OVA.