Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wilfredktlr opened this issue Jul 26, 2023 · 3 comments
Closed
Labels
blocked by external lib bug Something isn't working

Comments

@wilfredktlr
Copy link

Bug report

Describe the bug

I use a reverse proxy (HAProxy) to access the webinterface. When Awtrix want's to load a resource (eg. http://${window.location.hostname}/[filename]) it fails because the browser cannot access it when the webinterface is accessed using HTTPS or a subdirectory. This causes the webinterface to not work correctly (eg. the menu).

Additional information

  • Devices involved:
    • Model: Ulanzi Awtrix Smart Pixel Clock 2882 (TC001)
    • AWTRIX-LIGHT version: v0.71

To Reproduce

Steps to reproduce the behavior:

  • Setup a reverse proxy to access the site using HTTPS and/or a subdirectory.

Expected behavior

No JavaScript errors and a working menu.

Screenshots

An example of a fixed protocol and path.

image

The JavaScript error and non-working menu.

image

Logs

N/A

Additional context

A possible solution would be to make the URL relative (eg. var e=new URL('./config.json');).

@wilfredktlr wilfredktlr added the bug Something isn't working label Jul 26, 2023
@Blueforcer
Copy link
Owner

This "bug" should belong to the webinterface library.
https://github.com/cotestatnt/esp-fs-webserver

My knowlege for that is limited. Feel free to open a PR

@wilfredktlr
Copy link
Author

wilfredktlr commented Jul 26, 2023

Thanks. I didn't realize that this was an external library. I've opened an issue over there.

@wilfredktlr
Copy link
Author

wilfredktlr commented Aug 11, 2023

The author of the esp-fs-webserver just fixed the issue in version 1.2.3.

PS. I see the library is included in your source files. I'm a webdevelop and no expert on ESP programming but can't you add you add it to the platformio.ini file (source) so you can easily update to a new version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked by external lib bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants