const proxy = process.env.VUE_APP_API_URL_PREFIX
  ? {
      "/ingest": {
        target: process.env.VUE_APP_API_URL_PREFIX,
        changeOrigin: true,
      },
      "/location": {
        target: process.env.VUE_APP_API_URL_PREFIX,
        changeOrigin: true,
      },
    }
  : undefined;

module.exports = {
  publicPath: "./",
  devServer: {
    headers: {
      "Cache-Control": "no-store",
    },
    https: false,
    ...(proxy ? { proxy } : {}),
  },
};
