Skip to content
This repository was archived by the owner on Jul 20, 2021. It is now read-only.

add certmagic package to host explorer frontend with https#511

Open
DylanVerstraete wants to merge 2 commits into
masterfrom
feat/caddy-refactor
Open

add certmagic package to host explorer frontend with https#511
DylanVerstraete wants to merge 2 commits into
masterfrom
feat/caddy-refactor

Conversation

@DylanVerstraete

Copy link
Copy Markdown
Contributor

fixes #505

Example of how to integrate in Tfchain:

// Start serving frontend if there is such a folder
go func() {
	domains := []string{""}
	err = explorer.ServeFrontend(true, domains, "")
	if err != nil {
		servErrs <- err
	}
}()

@robvanmieghem

robvanmieghem commented Mar 26, 2019

Copy link
Copy Markdown
Contributor

I like the certmagic integration but not the hardcoding of LetsEncryptStagingCA Ca and the port, it also uses a different domain/port now than the explorer rest api, it would be better if they can be both served by the same port and domain+port

@robvanmieghem robvanmieghem left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

see comment

@DylanVerstraete

DylanVerstraete commented May 9, 2019

Copy link
Copy Markdown
Contributor Author

Added flags to rivined:

  • -c "stagingCertificate", indicates if a staging certificate should be used.
  • -e "hostExplorer", indicates if we should host the explorer ourself.
  • -caddy-domains list of caddy domains for our certificate.

It also now serves the frontend and backend on the same host/port.

Needs to be tested in production right now.

@GlenDC GlenDC requested a review from LeeSmet May 10, 2019 08:23
@GlenDC

GlenDC commented May 10, 2019

Copy link
Copy Markdown
Contributor

@LeeSmet please give a proper review of this PR ASAP.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Host the explorer html ourselves

3 participants