gristlabs_grist-core/test/server
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
..
lib Introduce APP_HOME_INTERNAL_URL and fix duplicate docs (#915) 2024-05-14 12:58:41 -04:00
utils (core) sanitizing redis errors 2023-06-06 10:51:17 +02:00
Comm.ts Shutdown Doc worker when it is not considered as available in Redis #831 (#856) 2024-04-04 10:25:42 -04:00
customUtil.ts (core) Adding latest version section to the admin panel. 2024-04-29 21:59:36 +02:00
docTools.ts (core) Porting the AI evaluation script 2023-03-15 14:54:28 +01:00
generateInitialDocSql.ts update comment 2023-01-17 15:59:09 -05:00
gristClient.ts Bump dependencies versions 2024-04-29 14:54:36 -04:00
tcpForwarder.ts (core) Add options to /status health-check endpoints to check DB and Redis liveness. 2023-10-02 14:41:04 -04:00
testUtils.ts (core) Endpoint to report on the latest version of stable grist-core image 2024-04-09 17:03:49 +02:00
wait.ts (core) Add timeouts to prevent ActiveDoc bad state during shutdown. 2023-09-26 15:32:49 -04:00