This commit is contained in:
zeppi 2021-07-29 13:07:56 -04:00 committed by jessopb
parent 816c7089c1
commit 248bb406e9

View file

@ -65,12 +65,11 @@ if (process.env.SDK_API_URL) {
} }
let sdkAPIHost = process.env.SDK_API_HOST || process.env.SDK_API_URL; let sdkAPIHost = process.env.SDK_API_HOST || process.env.SDK_API_URL;
// @if TARGET='web' sdkAPIHost = LBRY_WEB_API;
sdkAPIHost = LBRY_WEB_PUBLISH_API || LBRY_WEB_API;
// @endif
export const SDK_API_PATH = `${sdkAPIHost}/api/v1`; export const SDK_API_PATH = `${sdkAPIHost}/api/v1`;
const proxyURL = `${SDK_API_PATH}/proxy`; const proxyURL = `${SDK_API_PATH}/proxy`;
const publishURL = LBRY_WEB_PUBLISH_API; // || `${SDK_API_PATH}/proxy`;
Lbry.setDaemonConnectionString(proxyURL); Lbry.setDaemonConnectionString(proxyURL);
@ -80,7 +79,7 @@ Lbry.setOverride(
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
apiPublishCallViaWeb( apiPublishCallViaWeb(
apiCall, apiCall,
proxyURL, publishURL,
Lbry.getApiRequestHeaders() && Object.keys(Lbry.getApiRequestHeaders()).includes(X_LBRY_AUTH_TOKEN) Lbry.getApiRequestHeaders() && Object.keys(Lbry.getApiRequestHeaders()).includes(X_LBRY_AUTH_TOKEN)
? Lbry.getApiRequestHeaders()[X_LBRY_AUTH_TOKEN] ? Lbry.getApiRequestHeaders()[X_LBRY_AUTH_TOKEN]
: '', : '',