1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import Axios from "../../node_modules/axios";
7 export const CONFIG_URL = process.env.REACT_APP_ARVADOS_CONFIG_URL || "/config.json";
9 export interface Config {
13 const defaultConfig: Config = {
14 API_HOST: process.env.REACT_APP_ARVADOS_API_HOST || ""
17 export const fetchConfig = () => {
19 .get<Config>(CONFIG_URL + "?nocache=" + (new Date()).getTime())
20 .then(response => response.data)
21 .catch(() => Promise.resolve(defaultConfig));