Skip to content
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

feat: replace http with https #40

Merged
merged 2 commits into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"main": "public/electron.js",
"homepage": "./",
"version": "1.1.0-alpha.5",
"version": "1.1.0-alpha.7",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.32",
Expand All @@ -38,7 +38,7 @@
"rxjs": "^6.6.3"
},
"scripts": {
"react-start": "react-scripts start",
"react-start": "HTTPS=true react-scripts start",
"react-build": "react-scripts build",
"react-test": "react-scripts test --env=jsdom",
"react-eject": "react-scripts eject",
Expand All @@ -47,7 +47,7 @@
"build": "yarn lint && yarn react-build && yarn electron-build --publish never",
"build-all": "yarn lint && yarn react-build && yarn electron-build --publish never -mwl",
"build-wl": "yarn lint && yarn react-build && yarn electron-build --publish never --win --linux",
"start": "concurrently --kill-others \"cross-env BROWSER=none yarn react-start\" \"wait-on http://localhost:3000 && electron .\"",
"start": "concurrently --kill-others \"cross-env BROWSER=none yarn react-start\" \"wait-on https://localhost:3000 && electron .\"",
"test": "prettier --check src/ && yarn react-test",
"lint": "eslint . --ext .js,.ts,.tsx",
"prettier": "prettier --write src/"
Expand Down
11 changes: 10 additions & 1 deletion public/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function createWindow() {
});
mainWindow.loadURL(
isDev
? "http://localhost:3000"
? "https://localhost:3000"
: `file://${path.join(__dirname, "../build/index.html")}`
);
mainWindow.on("closed", () => (mainWindow = null));
Expand Down Expand Up @@ -59,3 +59,12 @@ app.on("activate", () => {
createWindow();
}
});

// SSL/TSL: self signed certificate support
app.on(
"certificate-error",
(event, _webContents, _url, _error, _certificate, callback) => {
event.preventDefault();
callback(true);
}
);
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const XUD_DISCORD_URL = "https://discord.com/invite/YgDhMSn";
export const XUD_DOCKER_DOCS_URL =
"https://docs.exchangeunion.com/start-earning/market-maker-guide";

export const XUD_DOCKER_LOCAL_MAINNET_URL = "http://localhost:8889";
export const XUD_DOCKER_LOCAL_MAINNET_URL = "https://localhost:8889";

export const XUD_NOT_READY = [
"Error",
Expand Down
2 changes: 1 addition & 1 deletion src/setup/ConnectToRemote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const handleConnectClick = (
): void => {
const address = xudDockerUrl.startsWith("http")
? xudDockerUrl
: `http://${xudDockerUrl}`;
: `https://${xudDockerUrl}`;
setConnecting(true);
api.statusByService$("xud", address).subscribe({
next: () => {
Expand Down