mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-08-31 23:19:36 +00:00
Use INNER_NOTIFICATION_SERVER_URL env
This commit is contained in:
@@ -115,9 +115,9 @@ func LoadFileServerOptions(centralDir string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
notifServer := os.Getenv("NOTIFICATION_SERVER_URL")
|
notifServer := os.Getenv("INNER_NOTIFICATION_SERVER_URL")
|
||||||
if notifServer != "" {
|
if notifServer != "" {
|
||||||
NotificationURL = fmt.Sprintf("%s:8083", notifServer)
|
NotificationURL = notifServer
|
||||||
EnableNotification = true
|
EnableNotification = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -111,7 +111,6 @@ load_config (SeafileSession *session, const char *config_file_path)
|
|||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GKeyFile *config = NULL;
|
GKeyFile *config = NULL;
|
||||||
char *notif_server = NULL;
|
char *notif_server = NULL;
|
||||||
int notif_port = 8083;
|
|
||||||
const char *private_key = NULL;
|
const char *private_key = NULL;
|
||||||
const char *site_root = NULL;
|
const char *site_root = NULL;
|
||||||
const char *log_to_stdout = NULL;
|
const char *log_to_stdout = NULL;
|
||||||
@@ -136,7 +135,7 @@ load_config (SeafileSession *session, const char *config_file_path)
|
|||||||
private_key = g_getenv("JWT_PRIVATE_KEY");
|
private_key = g_getenv("JWT_PRIVATE_KEY");
|
||||||
site_root = g_getenv("SITE_ROOT");
|
site_root = g_getenv("SITE_ROOT");
|
||||||
log_to_stdout = g_getenv("SEAFILE_LOG_TO_STDOUT");
|
log_to_stdout = g_getenv("SEAFILE_LOG_TO_STDOUT");
|
||||||
notif_server = g_getenv("NOTIFICATION_SERVER_URL");
|
notif_server = g_getenv("INNER_NOTIFICATION_SERVER_URL");
|
||||||
|
|
||||||
if (!private_key) {
|
if (!private_key) {
|
||||||
seaf_warning ("Failed to read JWT_PRIVATE_KEY.\n");
|
seaf_warning ("Failed to read JWT_PRIVATE_KEY.\n");
|
||||||
@@ -145,9 +144,7 @@ load_config (SeafileSession *session, const char *config_file_path)
|
|||||||
}
|
}
|
||||||
if (notif_server && g_strcmp0 (notif_server, "") != 0) {
|
if (notif_server && g_strcmp0 (notif_server, "") != 0) {
|
||||||
session->notif_server_private_key = g_strdup (private_key);
|
session->notif_server_private_key = g_strdup (private_key);
|
||||||
char notif_url[128];
|
session->notif_url = g_strdup (notif_server);
|
||||||
g_sprintf (notif_url, "%s:%d", notif_server, notif_port);
|
|
||||||
session->notif_url = g_strdup (notif_url);
|
|
||||||
}
|
}
|
||||||
session->seahub_pk = g_strdup (private_key);
|
session->seahub_pk = g_strdup (private_key);
|
||||||
if (!site_root || g_strcmp0 (site_root, "") == 0) {
|
if (!site_root || g_strcmp0 (site_root, "") == 0) {
|
||||||
|
Reference in New Issue
Block a user