Rework env api route
This commit is contained in:
parent
c29de8a4eb
commit
14b6924b02
1 changed files with 3 additions and 5 deletions
8
ui/app/api/env/route.ts
vendored
8
ui/app/api/env/route.ts
vendored
|
@ -1,15 +1,13 @@
|
|||
import process from 'process';
|
||||
import { NextResponse } from 'next/server';
|
||||
|
||||
async function requestHandler(_request: Request): NextResponse {
|
||||
export async function GET(_request: Request): NextResponse {
|
||||
// Access environment variables
|
||||
const envVars = {
|
||||
BACKEND_API_URL: process.env.BACKEND_API_URL,
|
||||
BACKEND_WS_URL: process.env.BACKEND_WS_URL
|
||||
'BACKEND_API_URL': process.env.BACKEND_API_URL,
|
||||
'BACKEND_WS_URL': process.env.BACKEND_WS_URL
|
||||
}
|
||||
|
||||
// Return the environment variables as a JSON response
|
||||
return NextResponse.json(envVars);
|
||||
}
|
||||
|
||||
export { requestHandler as GET };
|
Loading…
Add table
Reference in a new issue