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

feat: add INGRESS_TOKEN env variable to set the ingress session cookie #3892

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

darkbasic
Copy link
Contributor

SERVER_URL=https://192.168.1.x:8123/api/hassio_ingress/abcdefg INGRESS_TOKEN=123456789 npm run dev

image

I needed a way to connect my local development frontend to the remote zwave-js-ui backend. Since the HASSIO docker container doesn't expose the port to the host the easiest way around it is via Hass.io Ingress. Unfortunately that needs cookie authentication, which can be easily injected via Vite's built-in proxy. This PR adds an INGRESS_TOKEN env variable where you can specify the token and it will take care of injecting the cookie for each API request. Use Chrome/Firefox DevTools to figure out what's the correct Ingress SERVER_URL and INGRESS_TOKEN.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10872120036

Details

  • 0 of 10 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 20.998%

Changes Missing Coverage Covered Lines Changed/Added Lines %
vite.config.mjs 0 10 0.0%
Totals Coverage Status
Change from base Build 10831595247: -0.01%
Covered Lines: 3899
Relevant Lines: 19750

💛 - Coveralls

Copy link
Member

@robertsLando robertsLando left a comment

Choose a reason for hiding this comment

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

LGTM

@robertsLando robertsLando merged commit 66c930c into zwave-js:master Sep 16, 2024
9 checks passed
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.

3 participants