Aloe Express - force HTTPS ?

  1. 6 months ago

    Olivier C

    24 Nov 2018 Pre-Release Testers, Xojo Pro Europe (Belgium, France)

    Hi there,

    I’m using Aloe Express for a web app and it’s great ! The app is used on a small LAN, no connection to the web, no web server.
    I’m using SSL with a self-signed certificate and it’s fine.

    But the users have to explicitly connect to the app using HTTPS, https://ipaddress:port
    In a Xojo web app I can force https in HandleURL, but Aloe Express is a console app.

    Does someone know how to force HTTPS in Aloe Express ?

    Thanks !

  2. Greg O

    24 Nov 2018 Xojo Inc

    You’ll probably have to send a response with a 302 response code and a location header which points to the secure url.

  3. Olivier C

    24 Nov 2018 Pre-Release Testers, Xojo Pro Europe (Belgium, France)

    Hi Greg,

    Thanks. But if the user types the address with http:// I never get the request, so I can’t send a response.
    The browser is just hanging, waiting, no error, no timeout...

  4. Thom M

    24 Nov 2018 Pre-Release Testers Greater Hartford Area, CT

    It seems like your server is only listening on 443. Or port 80 is blocked in some way.

  5. Olivier C

    24 Nov 2018 Pre-Release Testers, Xojo Pro Europe (Belgium, France)

    the Aloe server is configured to listen to port 8089:

    Server.Port = 8089
    Server.Secure = True

    with https://ipaddress:8089 I get my index page, with http://ipaddress:8089 I don’t get the request.

  6. Thom M

    24 Nov 2018 Pre-Release Testers Greater Hartford Area, CT

    I’m not an Aloe user, but looking at the docs, I think the right way to handle this is to run another insecure server on another port.

  7. Olivier C

    25 Nov 2018 Pre-Release Testers, Xojo Pro Europe (Belgium, France)

    Thanks Tom,
    That was indeed my alternative but it’s a bit overkill to create a 2nd app only to redirect http calls.
    Maybe @Tim D has a better idea.

    Thanks anyway

  8. Julian S

    25 Nov 2018 Pre-Release Testers, Xojo Pro UK
    Edited 6 months ago

    If 80 and/or 443 are already in use then you could always add another IP to the box then bind aloe to that, use the default ports (80/443) then you dont need to bother with the :port on the end. Then from a web browser any request for http will go to 80 and https to 443. Add another aloe on 80 to redirect to 443, thats just the way things are done. From the OP I see you're not using a modem/router and if you dont want to use https://ip/ then add and entry to your /private/etc/hosts file (mac/linux) or hosts file (windows) so you can type something like https://intranet/

  9. Olivier C

    25 Nov 2018 Pre-Release Testers, Xojo Pro Europe (Belgium, France)

    Hi Julian,

    Thanks for this. I was using the hosts file and still do, but now most of the users are using their own mobile phones and tablets, where there are no hosts files per se.
    Maybe the easiest would be to install a DNS server somewhere on the LAN (there is no server).

or Sign Up to reply!