mirror of
https://github.com/nicotsx/zerobyte.git
synced 2026-02-20 07:45:30 -05:00
fix: use 127.0.0.1 when making server to server requests
This commit is contained in:
@@ -4,3 +4,5 @@ RESTIC_CACHE_DIR=./data/restic/cache
|
||||
ZEROBYTE_REPOSITORIES_DIR=./data/repositories
|
||||
ZEROBYTE_VOLUMES_DIR=./data/volumes
|
||||
APP_SECRET=<openssl rand -hex 32>
|
||||
BASE_URL=http://localhost:300
|
||||
PORT=3000
|
||||
|
||||
@@ -4,10 +4,11 @@ import {
|
||||
createRequestClient,
|
||||
runWithRequestClient,
|
||||
} from "~/lib/request-client";
|
||||
import { config } from "../server/core/config";
|
||||
|
||||
export const apiClientMiddleware = createMiddleware().server(async ({ next, request }) => {
|
||||
const client = createRequestClient({
|
||||
baseUrl: new URL(request.url).origin,
|
||||
baseUrl: `http://127.0.0.1:${config.port}`,
|
||||
headers: {
|
||||
cookie: getRequestHeaders().get("cookie") ?? "",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user