INNER CODE UNIT · JavaScript

readSubpathFromMeta

giuseppe99barchetta/SuggestArr · client/src/router/index.js:13

function readSubpathFromMeta() {
  const metaTag = document.querySelector('meta[name="suggestarr-subpath"]');
  return metaTag ? metaTag.getAttribute("content") || "" : "";
}

function configureAxiosSubpath(subpath) {
  if (import.meta.env.DEV) {
    axios.defaults.baseURL = "http://localhost:5000" + subpath;
  } else {
    axios.defaults.baseURL = subpath || "/";
  }
}

let _configPromise = null;

/**
 * Load config without requiring authentication (setup mode).
 * Uses `_skipAuth: true` so public endpoints work during setup.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…