-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Lightning: Link to services directly #3593
Conversation
string cookieFileContent = null; | ||
bool isFake = false; | ||
try | ||
{ | ||
cookieFileContent = await System.IO.File.ReadAllTextAsync(connectionString.CookieFilePath); | ||
isFake = connectionString.CookieFilePath == "fake"; | ||
connectionString.CookieFilePath = null; | ||
} | ||
catch (Exception ex) | ||
bool isFake = connectionString.CookieFilePath == "fake"; // Hacks for testing | ||
string cookieFileContent = isFake ? "fake" : null; | ||
if (!isFake) | ||
{ | ||
throw new System.IO.FileNotFoundException("Cookie file path not found", ex); | ||
try | ||
{ | ||
cookieFileContent = await System.IO.File.ReadAllTextAsync(connectionString.CookieFilePath); | ||
} | ||
catch (Exception ex) | ||
{ | ||
throw new System.IO.FileNotFoundException("Cookie file path not found", ex); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part skips the cookie file reading for the fake
path. The Spark part below looked like this is ok, but it never reached that point, because there was always the FileNotFoundException
being thrown.
"BTCPAY_BTCEXTERNALSPARK": "server=/spark/btc/;cookiefile=fake", | ||
"BTCPAY_BTCEXTERNALCHARGE": "server=https://127.0.0.1:53280/mycharge/btc/;cookiefilepath=fake", | ||
"BTCPAY_BTCEXTERNALRTL": "server=/rtl/api/authenticate/cookie;cookiefile=fake", | ||
"BTCPAY_BTCEXTERNALTHUNDERHUB": "server=/thub/sso;cookiefile=fake", | ||
"BTCPAY_EXTERNALSERVICES": "totoservice:totolink;Lightning Terminal:/lit/;", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just adding these fake services for testing in dev mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this and it seems to be working as expected.
1b5e6eb
to
48a57fa
Compare
Dead link check failure unrelated. |
Closes #3552.