import axios from "axios"; import { csrftoken, isBrowser } from "../utils/utils.js"; export const roomInstance = axios.create({ baseURL: `${process.env.NEXT_PUBLIC_HOST}/api/room/`, headers: { "Content-Type": "application/json", Accept: "application/json", "Access-Control-Allow-Origin": "*", "X-CSRFToken": csrftoken != undefined ? csrftoken : "", Authorization: isBrowser ? localStorage.getItem("token") !== null ? `Token ${localStorage.getItem("token")}` : null : null, }, });