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

Allow serving under a non-root base path #19911

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JamieMagee
Copy link

This allows for scenarios where zigbee2mqtt is behind a reverse proxy. For example example.com/zigbee2mqtt instead of a root path like zigbee2mqtt.example.com.

I also tried to make the WS server available under the same path, but wasn't able to test these changes. I'd appreciate and input or help on testing that.

Related issues:

This allows for scenarios where zigbee2mqtt is behind a reverse proxy. For example `example.com/zigbee2mqtt` instead of a root path like `zigbee2mqtt.example.com`.

Related issues:
- nurikk/zigbee2mqtt-frontend#275
- nurikk/zigbee2mqtt-frontend#971
- nurikk/zigbee2mqtt-frontend#1690
@Koenkk
Copy link
Owner

Koenkk commented Nov 30, 2023

Could you also make a pr for the docs?

// @ts-ignore
this.fileServer(request, response, finalhandler(request, response));
} else {
response.writeHead(404).end();
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps use a 302 and point it to the path, that way if no reverse proxy is used (e.g. curl on localhost) it would end up on the correct spot.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps use a 302 and point it to the path, that way if no reverse proxy is used (e.g. curl on localhost) it would end up on the correct spot.

Can we accept this? This is a QOL comment on a real issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants