From 264fc2f99832018851dec68d4bddfc651b3c2f72 Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 27 Sep 2021 14:11:18 +0200 Subject: [PATCH] aperture: allow relative macaroon/tls paths --- aperture.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/aperture.go b/aperture.go index fb40ae5..4ef4326 100644 --- a/aperture.go +++ b/aperture.go @@ -16,6 +16,7 @@ import ( "github.com/lightninglabs/aperture/auth" "github.com/lightninglabs/aperture/mint" "github.com/lightninglabs/aperture/proxy" + "github.com/lightningnetwork/lnd" "github.com/lightningnetwork/lnd/build" "github.com/lightningnetwork/lnd/cert" "github.com/lightningnetwork/lnd/lnrpc" @@ -335,6 +336,14 @@ func getConfig(configFile string) (*Config, error) { return nil, err } + // Clean and expand our cert and macaroon paths. + cfg.Authenticator.TLSPath = lnd.CleanAndExpandPath( + cfg.Authenticator.TLSPath, + ) + cfg.Authenticator.MacDir = lnd.CleanAndExpandPath( + cfg.Authenticator.MacDir, + ) + // Then check the configuration that we got from the config file, all // required values need to be set at this point. if cfg.ListenAddr == "" {