Commit d2b7ef58 authored by 熊洋洋's avatar 熊洋洋

fix: fix site proxy slow

parent 7ec6916c
"use client"
import axios from 'redaxios';
const APi = axios.create({
});
export const backendApi = axios.create({
"baseURL":process.env.NEXT_PUBLIC_BACKEND_URL || "http://localhost:3001"
"baseURL": globalThis?.location?.protocol === 'https:' ? '/backend' : (process.env.NEXT_PUBLIC_BACKEND_URL || "http://localhost:3001")
});
export default APi;
\ No newline at end of file
export default APi;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment