diff --git a/.env.sample b/.env.sample index b813cb6..e58bdec 100644 --- a/.env.sample +++ b/.env.sample @@ -1,2 +1,4 @@ ENCRYPTION_KEY=SOME_STRING -NAME=CONFIG_NAME \ No newline at end of file +NAME=CONFIG_NAME +CLIENT_API_KEY=API_KEY +USER_AGENT='' \ No newline at end of file diff --git a/src/constants.ts b/src/constants.ts index f1fd019..08df1a1 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,12 +1,15 @@ +import 'dotenv/config'; +import * as process from 'node:process'; + import { RequestHeader } from './types'; -export const CLIENT_API_KEY = 'JlE5Jldo5Jibnk5O5hTx6XVqsJu4WJ26'; +export const CLIENT_API_KEY = process.env.CLIENT_API_KEY; export const BASE_URL = 'https:/vrchat.com'; export const API_BASE_URL = `${BASE_URL}/api/1`; export const DEFAULT_HEADER: RequestHeader = { - 'User-Agent': 'VRC-ASS/0.1.0 onetime.jon.yeb@outlook.de', + 'User-Agent': process.env.USER_AGENT, // 'connect-src': `${BASE_URL}*`, // 'Access-Control-Allow-Origin': BASE_URL, };