From 9f17e89b5b52fbbb8ec56d2d68820eba3db7b917 Mon Sep 17 00:00:00 2001 From: b1ek Date: Wed, 17 May 2023 15:01:08 +1000 Subject: [PATCH] change urls --- pairent_backend/pairent_app/views.py | 6 +++--- pairent_frontend_react/src/constants.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pairent_backend/pairent_app/views.py b/pairent_backend/pairent_app/views.py index 6e55cd7..10a7575 100644 --- a/pairent_backend/pairent_app/views.py +++ b/pairent_backend/pairent_app/views.py @@ -164,7 +164,7 @@ class UserLogin(APIView): auth_data = get_oauth_token('https://vvsu.ru/connect', { 'grant_type': 'authorization_code', - 'redirect_uri': 'https://pairent.vvsu.ru/sign-in/', + 'redirect_uri': 'https://tochka.vvsu.ru/sign-in/', 'code': data['code'], 'code_verifier': data['code_verifier'], 'client_id': 'it-hub-client', @@ -233,8 +233,8 @@ def VVSUAuthProxy(req: HttpRequest): preq = requests.request(req.method, proxy, headers={ 'User-Agent': 'OIDC Client / Pairent', - 'Origin': 'http://pairent.vvsu.ru', - 'Referer': 'http://pairent.vvsu.ru' + 'Origin': 'https://tochka.vvsu.ru', + 'Referer': 'https://tochka.vvsu.ru' }); resp = HttpResponse(preq.content); diff --git a/pairent_frontend_react/src/constants.js b/pairent_frontend_react/src/constants.js index 67ea348..a017078 100644 --- a/pairent_frontend_react/src/constants.js +++ b/pairent_frontend_react/src/constants.js @@ -7,7 +7,7 @@ const api_path = path => API_ROOT + path; * Api root path * @type {string} */ -const API_ROOT = window.location.protocol + '//' + window.location.host; +const API_ROOT = window.location.protocol + window.location.host; // ДЛЯ ПРОДА ПОСТАВИТЬ ЭТО: '//' + window.location.host /** OpenID Connect Client Config @@ -16,7 +16,7 @@ const API_ROOT = window.location.protocol + '//' + window.location.host; const OIDCConfig = { authority: api_path('/api/auth/vvsu/'), client_id: 'it-hub-client', - redirect_uri: 'https://pairent.vvsu.ru/sign-in/', + redirect_uri: 'https://tochka.vvsu.ru/sign-in/', scope: 'openid vvsu_IdUser vvsu_IdEmpl vvsu_IdStud vvsu_login given_name family_name' };