cotestatnt / esp-fs-webserver

ESP32/ESP8266 webserver, WiFi manager and web editor Arduino library
MIT License
105 stars 27 forks source link

Interface not working using reverse proxy (HTTPS and/or subdirectory) #29

Closed wilfredktlr closed 10 months ago

wilfredktlr commented 11 months ago

I'm using Awtrix (which uses this library) to access it's webinterface but it does not work correctly with HTTPS and/or a subdirectory. I've explained the problem in the Awtrix issue below.

https://github.com/Blueforcer/awtrix-light/issues/236

cotestatnt commented 10 months ago

Hi @wilfredktlr I've just updated the /setup source file. Now the protocol used for the internal links is the same as the webpage.

var url = new URL(`${window.location.protocol}//${window.location.hostname}/setup/config.json`);