haxetink / tink_web

Tinkerbell Web Framework
https://haxetink.github.io/tink_web
43 stars 14 forks source link

Include http protocol part when defining url for remoting endpoint? #96

Closed cambiata closed 4 years ago

cambiata commented 4 years ago

The current tink.web.proxy.Remote.hx implementation prepends the outgoing request url with '//': https://github.com/haxetink/tink_web/blob/c6903306c69a766468adf19c3e329ac43c6308dd/src/tink/web/proxy/Remote.hx#L58

This makes it impossible include the http protocol part in the host name when setting up a remoting endpoint. For me, this is causing problems when using remoting from a Firebase hosted app to functions driven server on the same domain:

For now, I've hacked tink.web.proxy.Remote.hx to not prepend '//' to get around this.

cambiata commented 4 years ago

Ah, I just noticed your TODO note in the source line above: 'consider putting protocol here'... :-)

kevinresol commented 4 years ago

You should choose the correct tink_http client, e.g. SecureJsClient

cambiata commented 4 years ago

Oh - lots of things to discover..! Was so proud I found JsClient..! :-) Thanks!