Skip to content

web ui does not work over HTTPS when connecting from outside the LAN through reverse proxy #937

Closed
@hyteoo

Description

@hyteoo

I currently run all my espurna devices inside a separate LAN, with no forwarding to WAN.
My setup involves a pfsense router with reverse proxy for accessing everything I need inside the LAN, over HTTPS only.

From time to time however I need to do some admin over the internet, so I have setup a reverse proxy rule that I can easily change to point to a specific espurna device.

Problem is when connecting over HTTPS, rev.proxy connects over HTTP to the espurna. Page is served but when webservices are called, they are called over HTTP (ws://....) so they end up nowhere.

Error received after logging in:

Mixed Content: The page at 'https://xxxxxx.com/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://xxxxxx.com/ws'. This request has been blocked; this endpoint must be available over WSS.

A workaround could be to detect if we are HTTP or HTTPS and request the WS accordingly.
What do you think?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions