From 95846bde1ea0b788e3830754dcde44cf2c6d12b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9=20=D0=A1=D0=B0?= =?UTF-8?q?=D0=B1=D0=B8=D0=BB=D0=B8=D0=BD?= Date: Wed, 8 Jul 2026 17:56:07 +0300 Subject: [PATCH] Update FrontAdmin URLs to dev/stage domains Co-authored-by: Cursor --- .env.development | 4 ++-- .env.production | 4 ++-- request.sh | 4 ++-- vite.config.ts | 7 +++++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.env.development b/.env.development index 9d6d63f..3c2d5cb 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -#VITE_API_BASE_URL=https://admin-api.eventhub.local -VITE_WS_URL=wss://admin-ws.eventhub.local +VITE_API_BASE_URL=https://admin-api.dev.eventhub.local +VITE_WS_URL=wss://admin-ws.dev.eventhub.local VITE_APP_TITLE=EventHub Admin \ No newline at end of file diff --git a/.env.production b/.env.production index 9d6d63f..7f2ccfe 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ -#VITE_API_BASE_URL=https://admin-api.eventhub.local -VITE_WS_URL=wss://admin-ws.eventhub.local +VITE_API_BASE_URL=https://admin-api.stage.eventhub.local +VITE_WS_URL=wss://admin-ws.stage.eventhub.local VITE_APP_TITLE=EventHub Admin \ No newline at end of file diff --git a/request.sh b/request.sh index ae80d84..8417553 100644 --- a/request.sh +++ b/request.sh @@ -1,5 +1,5 @@ -#curl -v -k 'https://admin-api.eventhub.local/api/v1/admin/subscriptions?limit=20&offset=1' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7,hu;q=0.6' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhZG1pbiIsImV4cCI6MTc3OTI3MzU1OCwiaWF0IjoxNzc5MTg3MTU4LCJyb2xlIjoic3VwZXJhZG1pbiIsInVzZXJfaWQiOiJKMlgzalBjRTFpYU9CSkgxbFRhUUJBIn0.tHgwrUItF790D0gE7NoSRQiGbgl80lvF3I0g3DOpbTw' -H 'Cache-Control: no-cache' -H 'Connection: keep-alive' -b 'grafana_session=7dd9380cd5241089924cf811d4df38b4; grafana_session_expiry=1779187380' -H 'Pragma: no-cache' -H 'Referer: http://localhost:5173/subscriptions' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36' -H 'sec-ch-ua: "Chromium";v="148", "Google Chrome";v="148", "Not/A)Brand";v="99"' -H 'sec-ch-ua-mobile: ?0' -H 'sec-ch-ua-platform: "Windows"' -curl -v -k 'https://admin-api.eventhub.local/v1/admin/events?limit=20&offset=0&sort=id&order=asc' \ +#curl -v -k 'https://admin-api.dev.eventhub.local/api/v1/admin/subscriptions?limit=20&offset=1' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7,hu;q=0.6' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhZG1pbiIsImV4cCI6MTc3OTI3MzU1OCwiaWF0IjoxNzc5MTg3MTU4LCJyb2xlIjoic3VwZXJhZG1pbiIsInVzZXJfaWQiOiJKMlgzalBjRTFpYU9CSkgxbFRhUUJBIn0.tHgwrUItF790D0gE7NoSRQiGbgl80lvF3I0g3DOpbTw' -H 'Cache-Control: no-cache' -H 'Connection: keep-alive' -b 'grafana_session=7dd9380cd5241089924cf811d4df38b4; grafana_session_expiry=1779187380' -H 'Pragma: no-cache' -H 'Referer: http://localhost:5173/subscriptions' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36' -H 'sec-ch-ua: "Chromium";v="148", "Google Chrome";v="148", "Not/A)Brand";v="99"' -H 'sec-ch-ua-mobile: ?0' -H 'sec-ch-ua-platform: "Windows"' +curl -v -k 'https://admin-api.dev.eventhub.local/v1/admin/events?limit=20&offset=0&sort=id&order=asc' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7,hu;q=0.6' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhZG1pbiIsImV4cCI6MTc3OTYzMDI3NSwiaWF0IjoxNzc5NTQzODc1LCJyb2xlIjoic3VwZXJhZG1pbiIsInVzZXJfaWQiOiJPRE05TjFFY1JWWmlJUGhSbVRMdjZ3In0.yAGwX5XJNC68WALUjDkhpoPPOugN1lEdGNyPDmbUleU' \ diff --git a/vite.config.ts b/vite.config.ts index 01a5496..a392136 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,17 +1,20 @@ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; +const apiBaseUrl = process.env.VITE_API_BASE_URL ?? 'https://admin-api.dev.eventhub.local'; +const wsUrl = process.env.VITE_WS_URL ?? 'wss://admin-ws.dev.eventhub.local'; + export default defineConfig({ plugins: [react()], server: { proxy: { '/v1': { - target: 'https://admin-api.eventhub.local', + target: apiBaseUrl, changeOrigin: true, secure: false, }, '/admin/ws': { - target: 'wss://admin-ws.eventhub.local', + target: wsUrl, ws: true, changeOrigin: true, secure: false,