Point frontend proxy to Aarthalabs API
This commit is contained in:
parent
20f32ba0de
commit
99522a5544
@ -4,7 +4,7 @@
|
|||||||
import { NextRequest, NextResponse } from "next/server";
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
import { ACCESS_COOKIE, NONCE_COOKIE } from "./auth-cookies";
|
import { ACCESS_COOKIE, NONCE_COOKIE } from "./auth-cookies";
|
||||||
|
|
||||||
const BASE_URL = process.env.LEDGERONE_API_URL ?? "http://localhost:3051";
|
const BASE_URL = process.env.LEDGERONE_API_URL ?? "https://api.aarthalabs.com";
|
||||||
|
|
||||||
export function getBackendUrl(path: string): string {
|
export function getBackendUrl(path: string): string {
|
||||||
return `${BASE_URL}/api/${path.replace(/^\//, "")}`;
|
return `${BASE_URL}/api/${path.replace(/^\//, "")}`;
|
||||||
|
|||||||
@ -126,7 +126,7 @@ writeFileSync("lib/backend.ts", `// Server-side proxy helper for Next.js API rou
|
|||||||
|
|
||||||
import { NextRequest, NextResponse } from "next/server";
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
|
|
||||||
const BASE_URL = process.env.LEDGERONE_API_URL ?? "http://localhost:3051";
|
const BASE_URL = process.env.LEDGERONE_API_URL ?? "https://api.aarthalabs.com";
|
||||||
|
|
||||||
export function getBackendUrl(path: string): string {
|
export function getBackendUrl(path: string): string {
|
||||||
return \`\${BASE_URL}/api/\${path.replace(/^\\//, "")}\`;
|
return \`\${BASE_URL}/api/\${path.replace(/^\\//, "")}\`;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user