mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
5e3cd94177
Context: On self-hosted instances, some places in the code rely on the fact that we resolves public domains while being behind reverse proxies. This leads to cases where features are not available, such as the "Duplicate document" one. Bugs that are solved - n self-hosted instances: Impossible to open templates and tutorials right after having converted them; Impossible to submit forms since version 1.1.13; Impossible to restore a previous version of a document (snapshot); Impossible to copy a document; Solution: Introduce the APP_HOME_INTERNAL_URL env variable, which is quite the same as APP_DOC_INTERNAL_URL except that it may point to any home worker; Make /api/worker/:assignmentId([^/]+)/?* return not only the doc worker public url but also the internal one, and adapt the call points like fetchDocs; Ensure that the home and doc worker internal urls are trusted by trustOrigin; --------- Co-authored-by: jordigh <jordigh@octave.org>
39 lines
1.8 KiB
TypeScript
39 lines
1.8 KiB
TypeScript
/**
|
|
* This module was automatically generated by `ts-interface-builder`
|
|
*/
|
|
import * as t from "ts-interface-checker";
|
|
// tslint:disable:object-literal-key-quotes
|
|
|
|
export const ClientJsonMemoryLimits = t.iface([], {
|
|
"totalSize": t.opt("number"),
|
|
"jsonResponseReservation": t.opt("number"),
|
|
"maxReservationSize": t.opt(t.union("number", "null")),
|
|
});
|
|
|
|
export const ITestingHooks = t.iface([], {
|
|
"getPort": t.func("number"),
|
|
"setLoginSessionProfile": t.func("void", t.param("gristSidCookie", "string"), t.param("profile", t.union("UserProfile", "null")), t.param("org", "string", true)),
|
|
"setServerVersion": t.func("void", t.param("version", t.union("string", "null"))),
|
|
"disconnectClients": t.func("void"),
|
|
"commShutdown": t.func("void"),
|
|
"commRestart": t.func("void"),
|
|
"commSetClientPersistence": t.func("number", t.param("ttlMs", "number")),
|
|
"commSetClientJsonMemoryLimits": t.func("ClientJsonMemoryLimits", t.param("limits", "ClientJsonMemoryLimits")),
|
|
"closeDocs": t.func("void"),
|
|
"setDocWorkerActivation": t.func("void", t.param("workerId", "string"), t.param("active", t.union(t.lit('active'), t.lit('inactive'), t.lit('crash')))),
|
|
"flushAuthorizerCache": t.func("void"),
|
|
"flushDocs": t.func("void"),
|
|
"getDocClientCounts": t.func(t.array(t.tuple("string", "number"))),
|
|
"setActiveDocTimeout": t.func("number", t.param("seconds", "number")),
|
|
"setDiscourseConnectVar": t.func(t.union("string", "null"), t.param("varName", "string"), t.param("value", t.union("string", "null"))),
|
|
"setWidgetRepositoryUrl": t.func("void", t.param("url", "string")),
|
|
"getMemoryUsage": t.func("object"),
|
|
"tickleUnhandledErrors": t.func("void", t.param("errType", "string")),
|
|
});
|
|
|
|
const exportedTypeSuite: t.ITypeSuite = {
|
|
ClientJsonMemoryLimits,
|
|
ITestingHooks,
|
|
};
|
|
export default exportedTypeSuite;
|