Giter VIP home page Giter VIP logo

Comments (8)

DylanPiercey avatar DylanPiercey commented on August 20, 2024 1

The API has completely changed and would likely require a rewrite of this module to integrate. I will dig a bit deeper when I get some time.

from auto-sni.

DylanPiercey avatar DylanPiercey commented on August 20, 2024

@janwo I have updated auto-sni to use 'greenlock-express'. There were some features removed (disabling forcessl, custom redirect https status code and self signed certs on failure) but the api is more/less the same (except for restify users.)

This module is now an extremely thin wrapper and is only 51 loc. Please try updating and let me know how this goes!

from auto-sni.

janwo avatar janwo commented on August 20, 2024

@DylanPiercey I tried it out now, but now it does not work on my hapi environment anymore. Any ideas?

[le/lib/middleware.js] created middleware
Handling ACME challenges and redirecting to https on plain port 80
Handling ACME challenges and serving https 443

And thats it...

from auto-sni.

DylanPiercey avatar DylanPiercey commented on August 20, 2024

@janwo can you post your setup code?

from auto-sni.

janwo avatar janwo commented on August 20, 2024
import {Server} from 'hapi';

// Initialize Hapi server.
let server = new Server({
    connections: {
	router: {
    	    isCaseSensitive: true,
	    stripTrailingSlash: true
	}
    }
});

// Load SSL key and certificate.
let autoSni = AutoSNI({
    email: Config.backend.mails.admin,
    agreeTos: true,
    debug: Config.debug,
    domains: [
	Config.backend.domain
    ],
    ports: {
	http: Config.backend.ports.http,
	https: Config.backend.ports.https
    }
});

// Create server connection.
server.connection({
	listener: autoSni,
	tls: true,
	autoListen: false
});

I removed forceSSL and the redirectCode in order to stay compatible to your update.

from auto-sni.

DylanPiercey avatar DylanPiercey commented on August 20, 2024

And you are running this on a server that is being accessed by Config.backend.domain?

from auto-sni.

janwo avatar janwo commented on August 20, 2024

Oh, I think I solved the error. I used the https prefix within the config. I try that out now. Sorry for wasting your time πŸ™„

from auto-sni.

DylanPiercey avatar DylanPiercey commented on August 20, 2024

No problem happy to help.

from auto-sni.

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.