gristlabs_grist-core/test/server/lib
Florent 5e3cd94177
Introduce APP_HOME_INTERNAL_URL and fix duplicate docs (#915)
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>
2024-05-14 12:58:41 -04:00
..
helpers Introduce APP_HOME_INTERNAL_URL and fix duplicate docs (#915) 2024-05-14 12:58:41 -04:00
ACLFormula.ts (core) Add dropdown conditions 2024-04-26 16:57:55 -04:00
ACLRulesReader.ts (core) Fix null references in form fields bug 2024-04-12 15:46:21 -07:00
Assistance.ts (core) Add AI Assistant retry with shorter prompt 2024-02-12 11:06:52 -05:00
Authorizer.ts Allow URLs with only a docID #768 (#771) 2023-11-29 15:13:29 -05:00
DocApi2.ts (core) New API to collect timing information from formula evaluation. 2024-04-24 11:07:11 +02:00
DocApi.ts Introduce APP_HOME_INTERNAL_URL and fix duplicate docs (#915) 2024-05-14 12:58:41 -04:00
GristSockets.ts Support HTTP long polling as an alternative to WebSockets (#859) 2024-03-28 13:22:20 -04:00
HostedStorageManager.ts Add option to skip Checksum verification between doc storage and Redis #751 (#767) 2024-03-07 14:11:17 -05:00
ManyFetches.ts Fix ManyFetches test so it checks TEST_REDIS_URL is set 2024-04-29 14:54:36 -04:00
MemoryPool.ts (core) Manage memory used for websocket responses to reduce the risk of server crashes. 2023-08-07 11:28:31 -04:00
MinIOExternalStorage.ts Shutdown Doc worker when it is not considered as available in Redis #831 (#856) 2024-04-04 10:25:42 -04:00
ProxyAgent.ts (core) Add logging of errors whenever ProxyAgent is used, and a test for it. 2023-05-17 10:21:53 -04:00
Telemetry.ts (core) Admin Panel and InstallAdmin class to identify installation admins. 2024-03-25 12:18:38 -04:00
UnhandledErrors.ts set TEST_CLEAN_DATABASE when running server tests (#806) 2023-12-27 09:56:59 -05:00
Webhooks-Proxy.ts set TEST_CLEAN_DATABASE when running server tests (#806) 2023-12-27 09:56:59 -05:00