OpenSprinkler Forums OpenSprinkler Mobile and Web App SSL issue wth haproxy & Safari

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #42845

    gpeterson
    Participant

    I’m securing external access to Opensprinker via haproxy with SSL and client certificates. It works fine on Chrome but Safari shows the black “loading” page and refreshes it repeatedly. It looks like the /jp resource isn’t loading. Has anyone else had similar issues or know how to fix it? Thanks.

    #42846

    Samer
    Keymaster

    Did you add the CORS header for the proxied request? It could be the headers aren’t being forwarded?

    Is there anything in the console? What error code do you get?

    It’s also possible your cert is self signed and not added to keychain.

    #42849

    gpeterson
    Participant

    I’m using path rewriting (accessing OpenSprinkler at https://<my_domain>/sprinklers) and it looks like OpenSprinkler uses absolute paths in some cases. I’m not sure how it ever worked with Chrome.

    Here are some reqests as logged by haproxy:

    GET /sprinklers
    GET /jp

    That second one should be:

    GET /sprinklers/jp

    #42851

    gpeterson
    Participant

    Fixed! I had to make haproxy pick the correct backend (OpenSprinkler) based on path or referer. This is in the frontend config:

    acl url_sprinklers path_beg -i /sprinklers
    acl referer_sprinklers hdr_dir(referer) -i /sprinklers

    use_backend sprinklers if url_sprinklers
    use_backend sprinklers if referer_sprinklers

    And this URL re-writing is in the backend:

    reqrep ^([^\ ]*\ /)sprinklers[/]?(.*) \1\2

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Mobile and Web App SSL issue wth haproxy & Safari