nginx: add separate endpoint for ip/setup screens
'setup' endpoint for setup/restore. we show the setup wizard. 'ip' endpoint is post activation. we show a splash screen here. Also, the https://ip will not respond to any api calls anymore (since this will leak the admin fqdn otherwise). We should probably make this customizable at some point. Fixes #739
This commit is contained in:
+2
-2
@@ -78,7 +78,7 @@ function onActivated(callback) {
|
||||
// 1. mail bounces can now be sent to the cloudron owner
|
||||
// 2. the restore code path can run without sudo (since mail/ is non-root)
|
||||
async.series([
|
||||
reverseProxy.removeDefaultConfig, // remove IP based nginx config once user is created
|
||||
(done) => reverseProxy.writeDefaultConfig({ activated :true }, done), // update IP based nginx config once user is created
|
||||
platform.start,
|
||||
cron.startJobs,
|
||||
function checkBackupConfiguration(callback) {
|
||||
@@ -141,7 +141,7 @@ function runStartupTasks() {
|
||||
// we remove the config as a simple security measure to not expose IP <-> domain
|
||||
if (!activated) {
|
||||
debug('runStartupTasks: not activated. generating IP based redirection config');
|
||||
return reverseProxy.writeDefaultConfig(callback);
|
||||
return reverseProxy.writeDefaultConfig({ activated: false }, callback);
|
||||
}
|
||||
|
||||
onActivated(callback);
|
||||
|
||||
Reference in New Issue
Block a user