chore: isHosted -> isCloudHosted for clarity
This commit is contained in:
@@ -4,7 +4,7 @@ import { trim } from "lodash";
|
||||
import queryString from "query-string";
|
||||
import EDITOR_VERSION from "@shared/editor/version";
|
||||
import stores from "~/stores";
|
||||
import isHosted from "~/utils/isHosted";
|
||||
import isCloudHosted from "~/utils/isCloudHosted";
|
||||
import download from "./download";
|
||||
import {
|
||||
AuthorizationError,
|
||||
@@ -107,7 +107,7 @@ class ApiClient {
|
||||
// not needed for authentication this offers a performance increase.
|
||||
// For self-hosted we include them to support a wide variety of
|
||||
// authenticated proxies, e.g. Pomerium, Cloudflare Access etc.
|
||||
credentials: isHosted ? "omit" : "same-origin",
|
||||
credentials: isCloudHosted ? "omit" : "same-origin",
|
||||
cache: "no-cache",
|
||||
});
|
||||
} catch (err) {
|
||||
|
||||
8
app/utils/isCloudHosted.ts
Normal file
8
app/utils/isCloudHosted.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import env from "~/env";
|
||||
|
||||
/**
|
||||
* True if the current installation is the cloud hosted version at getoutline.com
|
||||
*/
|
||||
const isCloudHosted = env.DEPLOYMENT === "hosted";
|
||||
|
||||
export default isCloudHosted;
|
||||
@@ -1,5 +0,0 @@
|
||||
import env from "~/env";
|
||||
|
||||
const isHosted = env.DEPLOYMENT === "hosted";
|
||||
|
||||
export default isHosted;
|
||||
Reference in New Issue
Block a user