Giter Site home page Giter Site logo

Comments (4)

arendruni avatar arendruni commented on May 28, 2024 2

As @rmhall suggested, I added a new config setting in the plugin which changes the properties of Axios:

rejectUnauthorized: If the HTTPS agent should check the validity of SSL cert, set it to false to allow self-signed certs to work. Default is true.

I released a new version (v0.3.2) that integrates the new config setting.

from homebridge-pihole.

rmhall avatar rmhall commented on May 28, 2024 1

Just installed Hoobs on a Raspberry Pi 4 along side Apache, Nginx etc, and then installed Pihole, and am using a self-signed certificate and ran across this in terms of getting errors with this plugin to connect properly - errors around the self-signed certificate.

A quick and dirty fix for this is to edit index.ts or the dist of index.js and add this line after "use strict"

process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';

This will allow self-signed certs to work. Technically this should be set through a property in the Axios requests more info here: axios/axios#535

There ideally should be a config setting in this plugin to allow a user to indicate they are using a self-signed cert, which would then change the properties of the axis HTTPS agent accordingly.

from homebridge-pihole.

palasinio avatar palasinio commented on May 28, 2024 1

Big THX @arendruni . In my case your change works as intended.

from homebridge-pihole.

arendruni avatar arendruni commented on May 28, 2024

Hi @palasinio,
Sorry for the late answer, I can’t help you so much since I have never configured the plugin to use https, I have in plan to switch my personal configuration to use it, but I don’t know when I will.
Did you have a look at #9, in which a user was having a problem configuring the certificate within node?

from homebridge-pihole.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.