feat(server): allow customize server external url (#7270)

closes https://github.com/toeverything/AFFiNE/issues/7252
This commit is contained in:
forehalo
2024-06-19 12:03:36 +00:00
parent 9746ddb5e0
commit d34c5c42ef
7 changed files with 105 additions and 56 deletions

View File

@@ -1,5 +1,6 @@
// Convenient way to map environment variables to config values.
AFFiNE.ENV_MAP = {
AFFINE_SERVER_EXTERNAL_URL: ['server.externalUrl'],
AFFINE_SERVER_PORT: ['server.port', 'int'],
AFFINE_SERVER_HOST: 'server.host',
AFFINE_SERVER_SUB_PATH: 'server.path',

View File

@@ -34,6 +34,9 @@ AFFiNE.server.port = 3010;
// /* The sub path of your server */
// /* For example, if you set `AFFiNE.server.path = '/affine'`, then the server will be available at `${domain}/affine` */
// AFFiNE.server.path = '/affine';
// /* The external URL of your server, will be consist of protocol + host + port by default */
// /* Useful when you want to customize the link to server resources for example the doc share link or email link */
// AFFiNE.server.externalUrl = 'http://affine.local:8080'
//
//
// ###############################################################