diff --git a/config.prod/src/.env b/config.prod/src/.env
--- a/config.prod/src/.env
+++ b/config.prod/src/.env
@@ -16,6 +16,7 @@
APP_WITH_SERVICES=1
APP_WITH_FILES=1
APP_WITH_WALLET=0
+APP_WITH_SIGNUP=0
APP_LDAP=1
APP_IMAP=1
@@ -23,9 +24,6 @@
APP_HEADER_CSP="connect-src 'self'; child-src 'self'; font-src 'self'; form-action 'self' data:; frame-ancestors 'self'; img-src blob: data: 'self' *; media-src 'self'; object-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-eval' 'unsafe-inline'; default-src 'self';"
APP_HEADER_XFO=sameorigin
-SIGNUP_LIMIT_EMAIL=0
-SIGNUP_LIMIT_IP=0
-
ASSET_URL=https://{{ host }}
WEBMAIL_URL=/roundcubemail/
diff --git a/src/app/Utils.php b/src/app/Utils.php
--- a/src/app/Utils.php
+++ b/src/app/Utils.php
@@ -506,6 +506,7 @@
'app.support_email',
'app.company.copyright',
'app.companion_download_link',
+ 'app.with_signup',
'mail.from.address'
];
diff --git a/src/config/app.php b/src/config/app.php
--- a/src/config/app.php
+++ b/src/config/app.php
@@ -266,6 +266,7 @@
'with_reseller' => (bool) env('APP_WITH_RESELLER', false),
'with_services' => (bool) env('APP_WITH_SERVICES', false),
'with_wallet' => (bool) env('APP_WITH_WALLET', true),
+ 'with_signup' => (bool) env('APP_WITH_SIGNUP', true),
'signup' => [
'email_limit' => (int) env('SIGNUP_LIMIT_EMAIL', 0),
diff --git a/src/resources/vue/Widgets/Menu.vue b/src/resources/vue/Widgets/Menu.vue
--- a/src/resources/vue/Widgets/Menu.vue
+++ b/src/resources/vue/Widgets/Menu.vue
@@ -21,7 +21,7 @@
{{ menuItemTitle(item) }}
-
+
{{ $t('menu.signup') }}
@@ -65,6 +65,7 @@
buildYear: buildDate.getFullYear(),
copyright: window.config['app.company.copyright'] || '',
languages: window.config['languages'] || [],
+ signupEnabled: window.config['app.with_signup'] || false,
menuList: []
}
},
diff --git a/src/routes/api.php b/src/routes/api.php
--- a/src/routes/api.php
+++ b/src/routes/api.php
@@ -48,17 +48,28 @@
Route::post('password-reset/init', [API\PasswordResetController::class, 'init']);
Route::post('password-reset/verify', [API\PasswordResetController::class, 'verify']);
Route::post('password-reset', [API\PasswordResetController::class, 'reset']);
-
- Route::get('signup/domains', [API\SignupController::class, 'domains']);
- Route::post('signup/init', [API\SignupController::class, 'init']);
- Route::get('signup/invitations/{id}', [API\SignupController::class, 'invitation']);
- Route::get('signup/plans', [API\SignupController::class, 'plans']);
- Route::post('signup/validate', [API\SignupController::class, 'signupValidate']);
- Route::post('signup/verify', [API\SignupController::class, 'verify']);
- Route::post('signup', [API\SignupController::class, 'signup']);
}
);
+if (\config('app.with_signup')) {
+ Route::group(
+ [
+ 'domain' => \config('app.website_domain'),
+ 'middleware' => 'api',
+ 'prefix' => 'auth'
+ ],
+ function () {
+ Route::get('signup/domains', [API\SignupController::class, 'domains']);
+ Route::post('signup/init', [API\SignupController::class, 'init']);
+ Route::get('signup/invitations/{id}', [API\SignupController::class, 'invitation']);
+ Route::get('signup/plans', [API\SignupController::class, 'plans']);
+ Route::post('signup/validate', [API\SignupController::class, 'signupValidate']);
+ Route::post('signup/verify', [API\SignupController::class, 'verify']);
+ Route::post('signup', [API\SignupController::class, 'signup']);
+ }
+ );
+}
+
Route::group(
[
'domain' => \config('app.website_domain'),