Giter Site home page Giter Site logo

proxied via https support about freeboard-sk HOT 5 CLOSED

signalk avatar signalk commented on August 16, 2024
proxied via https support

from freeboard-sk.

Comments (5)

panaaj avatar panaaj commented on August 16, 2024

Not sure to what scenario you are referring to which this happens.
All connections (api or stream) are based on the received endpoints from the hello message from the server.
I cannot replicate a situation where https or wss is not used if the endpoints define it.

If you could let me know how you get the issue to appear I will try to replicate it.

from freeboard-sk.

tkurki avatar tkurki commented on August 16, 2024

Oh right. My setup is with balena.io, that provides a publicly accessible proxied https connection to the http server running on the RPi. The server does not know that it is proxied via https and nor should it, because that would break local use.

What if freeboard tried to simply fall back to the host it was loaded from with no discovery if discovery fails?

from freeboard-sk.

panaaj avatar panaaj commented on August 16, 2024

So something like....
Send request to protocol://host:port/signalk
If hello response received then use it
else if (no response || response does not contain endpoints: { v1: { signalk-http: {}, signalk-ws: {} }
then fall back to

{ 
   endpoints: { 
      v1: {
         signalk-http= "protocol://host:port/signalk/v1/api/",
         signalk-ws= "protocol://host:port/signalk/v1/stream",
      }
   }
}

The only issue I see is that currently, due to the differences in behaviour between node server and artemis, resource PUTs and installed apps list rely on being able to determine the server type from the hello response.
Using a fallback will not guaraantee the correct server type so the above functions may not operate correctly.

Can we accelerate the PR's that seek to align server operation?

from freeboard-sk.

panaaj avatar panaaj commented on August 16, 2024

Addressed in v2.0.0

from freeboard-sk.

panaaj avatar panaaj commented on August 16, 2024

V2.0.0 released.

from freeboard-sk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.