Skip to content

Commit

Permalink
LDBR-4.10 (правки) HTTPS (#48)
Browse files Browse the repository at this point in the history
* LDBR-4.10: http -> https.

* LDBR-4.10: Убрать порты для бэкенда.

* LDBR-4.10: Исправить badge в readme.

* LDBR-4.10: Временный деплой.

* LDBR-4.10: Убрать временный деплой.
  • Loading branch information
DPeshkoff authored Dec 15, 2021
1 parent 20d6736 commit 3fd3e5a
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 41 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![CI](https://github.com/frontend-park-mail-ru/2021_2_LadnoDavayteBezRoflov/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/frontend-park-mail-ru/2021_2_LadnoDavayteBezRoflov/actions/workflows/CI.yml) ![Website](https://img.shields.io/website?down_message=offline&up_message=online&url=http%3A%2F%2F95.163.213.142%2F) ![GitHub repo size](https://img.shields.io/github/repo-size/frontend-park-mail-ru/2021_2_LadnoDavayteBezRoflov)
[![CI](https://github.com/frontend-park-mail-ru/2021_2_LadnoDavayteBezRoflov/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/frontend-park-mail-ru/2021_2_LadnoDavayteBezRoflov/actions/workflows/CI.yml) ![Website](https://img.shields.io/website?url=https%3A%2F%2Fbrrrello.ru) ![GitHub repo size](https://img.shields.io/github/repo-size/frontend-park-mail-ru/2021_2_LadnoDavayteBezRoflov)

# Trello

Expand All @@ -24,7 +24,7 @@ Trello frontend repository for Ladno Davayte Bez Roflov team, autumn of 2021.
[Link to API](https://app.swaggerhub.com/apis/DPeshkoff/LadnoDavayteBezRoflov).

### Deploy
[Link to deploy](http://95.163.213.142).
[Link to deploy](https://brrrello.ru).

### Usage

Expand Down Expand Up @@ -81,7 +81,7 @@ Versions are updated via two ways:

2. **Minor updates**: minor fixes and changes to server and modules. Example: *refactoring Network module*.

Latest version: `0.2.1`: *Service worker*.
Latest version: `0.2.2`: *HTTPS*.

### Code style
The project is written using slightly modified [Google ESling config](https://github.com/google/eslint-config-google). Code style changes:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ladnodavaytebezroflov-frontend",
"version": "0.2.1",
"version": "0.2.2",
"description": "LadnoDavayteBezRoflov team, Technopark, autumn of 2021",
"main": "./server/server.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
User-agent: *
Crawl-delay: 1
Host: http://95.163.213.142/
Host: https://brrrello.ru
69 changes: 34 additions & 35 deletions src/modules/Network/Network.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class Network {
this.SelfPort = SelfAddress.Port;

this.BackendUrl = BackendAddress.Url;
this.BackendPort = BackendAddress.Port;

this._endpoints = {
sessions: 'api/sessions',
Expand All @@ -35,7 +34,7 @@ class Network {
mode: 'cors',
credentials: 'include',
headers: {
Origin: `http://${this.SelfUrl}:${this.SelfPort}`,
Origin: `https://${this.SelfUrl}:${this.SelfPort}`,
},
};
}
Expand Down Expand Up @@ -65,7 +64,7 @@ class Network {
},
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.sessions}`,
`https://${this.BackendUrl}/${this._endpoints.sessions}`,
options);
}

Expand All @@ -82,7 +81,7 @@ class Network {
},
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.profile}/${data.userName}`,
`https://${this.BackendUrl}/${this._endpoints.profile}/${data.userName}`,
options);
}

Expand All @@ -100,7 +99,7 @@ class Network {
body: JSON.stringify(data),
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.profile}`,
`https://${this.BackendUrl}/${this._endpoints.profile}`,
options);
}

Expand All @@ -118,7 +117,7 @@ class Network {
body: JSON.stringify(data),
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/` +
`https://${this.BackendUrl}/` +
`${this._endpoints.profile}/${data.login}`,
options);
}
Expand All @@ -135,7 +134,7 @@ class Network {
body: data,
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/` +
`https://${this.BackendUrl}/` +
`${this._endpoints.profile}/${login}/upload`,
options);
}
Expand All @@ -154,7 +153,7 @@ class Network {
body: JSON.stringify(data),
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.sessions}`,
`https://${this.BackendUrl}/${this._endpoints.sessions}`,
options);
}

Expand All @@ -167,7 +166,7 @@ class Network {
method: 'get',
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.board}`,
`https://${this.BackendUrl}/${this._endpoints.board}`,
options);
}

Expand All @@ -184,7 +183,7 @@ class Network {
},
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.board}/${bid}`,
`https://${this.BackendUrl}/${this._endpoints.board}/${bid}`,
options);
}

Expand All @@ -202,7 +201,7 @@ class Network {
body: JSON.stringify(data),
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.card}`,
`https://${this.BackendUrl}/${this._endpoints.card}`,
options);
}

Expand All @@ -221,7 +220,7 @@ class Network {
body: JSON.stringify(data),
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.card}/${cid}`,
`https://${this.BackendUrl}/${this._endpoints.card}/${cid}`,
options);
}

Expand All @@ -238,7 +237,7 @@ class Network {
},
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.card}/${cid}`,
`https://${this.BackendUrl}/${this._endpoints.card}/${cid}`,
options);
}
/**
Expand All @@ -255,7 +254,7 @@ class Network {
body: JSON.stringify(data),
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.cardlist}`,
`https://${this.BackendUrl}/${this._endpoints.cardlist}`,
options);
}

Expand All @@ -274,7 +273,7 @@ class Network {
body: JSON.stringify(data),
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.cardlist}/${clid}`,
`https://${this.BackendUrl}/${this._endpoints.cardlist}/${clid}`,
options);
}

Expand All @@ -291,7 +290,7 @@ class Network {
},
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.cardlist}/${clid}`,
`https://${this.BackendUrl}/${this._endpoints.cardlist}/${clid}`,
options);
}

Expand All @@ -305,7 +304,7 @@ class Network {
method: 'post',
body: JSON.stringify(data),
};
return this.httpRequest(`http://${this.BackendUrl}:${this.BackendPort}/api/boards`,
return this.httpRequest(`https://${this.BackendUrl}/api/boards`,
options);
}

Expand All @@ -324,7 +323,7 @@ class Network {
body: JSON.stringify(data),
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.board}/${bid}`,
`https://${this.BackendUrl}/${this._endpoints.board}/${bid}`,
options);
}

Expand All @@ -341,7 +340,7 @@ class Network {
},
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.board}/${bid}`,
`https://${this.BackendUrl}/${this._endpoints.board}/${bid}`,
options);
}

Expand All @@ -357,7 +356,7 @@ class Network {
},
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.sessions}`,
`https://${this.BackendUrl}/${this._endpoints.sessions}`,
options);
}

Expand All @@ -371,7 +370,7 @@ class Network {
method: 'get',
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.usersearch.card}` +
`https://${this.BackendUrl}/${this._endpoints.usersearch.card}` +
`/${cid}/${searchString}`,
options);
}
Expand All @@ -386,7 +385,7 @@ class Network {
method: 'get',
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.usersearch.board}` +
`https://${this.BackendUrl}/${this._endpoints.usersearch.board}` +
`/${bid}/${searchString}`,
options);
}
Expand All @@ -401,7 +400,7 @@ class Network {
method: 'get',
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.usersearch.team}` +
`https://${this.BackendUrl}/${this._endpoints.usersearch.team}` +
`/${tid}/${searchString}`,
options);
}
Expand All @@ -419,7 +418,7 @@ class Network {
},
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.team}/${tid}` +
`https://${this.BackendUrl}/${this._endpoints.team}/${tid}` +
`/toggleuser/${uid}`, options);
}

Expand All @@ -436,7 +435,7 @@ class Network {
},
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.board}/${bid}` +
`https://${this.BackendUrl}/${this._endpoints.board}/${bid}` +
`/toggleuser/${uid}`, options);
}

Expand All @@ -453,7 +452,7 @@ class Network {
},
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.card}/${cid}` +
`https://${this.BackendUrl}/${this._endpoints.card}/${cid}` +
`/toggleuser/${uid}`, options);
}
/**
Expand All @@ -466,7 +465,7 @@ class Network {
method: 'post',
body: JSON.stringify(data),
};
return this.httpRequest(`http://${this.BackendUrl}:${this.BackendPort}` +
return this.httpRequest(`https://${this.BackendUrl}` +
`/${this._endpoints.checklists}`, options);
}

Expand All @@ -479,7 +478,7 @@ class Network {
const options = {
method: 'delete',
};
return this.httpRequest(`http://${this.BackendUrl}:${this.BackendPort}` +
return this.httpRequest(`https://${this.BackendUrl}` +
`/${this._endpoints.checklists}/${chlid}`, options);
}

Expand All @@ -494,7 +493,7 @@ class Network {
method: 'put',
body: JSON.stringify(data),
};
return this.httpRequest(`http://${this.BackendUrl}:${this.BackendPort}` +
return this.httpRequest(`https://${this.BackendUrl}` +
`/${this._endpoints.checklists}/${chlid}`, options);
}

Expand All @@ -508,7 +507,7 @@ class Network {
method: 'post',
body: JSON.stringify(data),
};
return this.httpRequest(`http://${this.BackendUrl}:${this.BackendPort}` +
return this.httpRequest(`https://${this.BackendUrl}` +
`/${this._endpoints.checklistsItems}`, options);
}

Expand All @@ -523,7 +522,7 @@ class Network {
method: 'put',
body: JSON.stringify(data),
};
return this.httpRequest(`http://${this.BackendUrl}:${this.BackendPort}` +
return this.httpRequest(`https://${this.BackendUrl}` +
`/${this._endpoints.checklistsItems}/${chliid}`, options);
}

Expand All @@ -536,7 +535,7 @@ class Network {
const options = {
method: 'delete',
};
return this.httpRequest(`http://${this.BackendUrl}:${this.BackendPort}` +
return this.httpRequest(`https://${this.BackendUrl}` +
`/${this._endpoints.checklistsItems}/${chliid}`, options);
}

Expand All @@ -552,7 +551,7 @@ class Network {
body: JSON.stringify(data),
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.comments}`,
`https://${this.BackendUrl}/${this._endpoints.comments}`,
options);
}

Expand All @@ -571,7 +570,7 @@ class Network {
body: JSON.stringify(data),
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.comments}/${data.cmid}`,
`https://${this.BackendUrl}/${this._endpoints.comments}/${data.cmid}`,
options);
}

Expand All @@ -588,7 +587,7 @@ class Network {
},
};
return this.httpRequest(
`http://${this.BackendUrl}:${this.BackendPort}/${this._endpoints.comments}/${data.cmid}`,
`https://${this.BackendUrl}/${this._endpoints.comments}/${data.cmid}`,
options);
}
}
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {CleanWebpackPlugin} = require('clean-webpack-plugin');
const {DefinePlugin} = require('webpack');

const DEPLOY_DIR = 'dist';
const SERVER_IP = '95.163.213.142';
const SERVER_IP = 'brrrello.ru';
const confConst = {
LOCAL_HOST: 'localhost',
BACKEND_RELEASE: process.env.BACKEND_RELEASE || SERVER_IP,
Expand Down

0 comments on commit 3fd3e5a

Please sign in to comment.