INNER CODE UNIT · TypeScript

getTransport

octelium/octelium · cluster/authserver/authserver/web/package/src/utils/client/index.ts:5

export const getTransport = () => {
  const domain = getDomain();
  const scheme = location.protocol === "https:" ? "https" : "http";

  if (!isDev() && !domain) {
    throw new Error("The Octelium domain is not configured.");
  }

  const baseUrl = isDev()
    ? window.location.origin
    : `${scheme}://octelium-api.${domain}`;

  return new grpcWeb.GrpcWebFetchTransport({
    baseUrl,

    fetchInit: {
      credentials: "include",
    },

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…