Skip to content

Commit f2918d3

Browse files
committed
Optimized use of profile URLs without prefix
(Set in advanced config)
1 parent e11ca44 commit f2918d3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

routes/web.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161
//Public route
6262
$custom_prefix = config('advanced-config.custom_url_prefix');
6363
Route::get('/going/{id?}/{link?}', [UserController::class, 'clickNumber'])->where('link', '.*')->name('clickNumber');
64-
Route::get('/' . $custom_prefix . '{littlelink}', [UserController::class, 'littlelink'])->name('littlelink');
64+
if (!str_contains(url()->full(), '@') and !in_array(url()->full(), [url('login'), url('register'), url('update'), url('updating'), url('backup')])) {
65+
Route::get('/' . $custom_prefix . '{littlelink}', [UserController::class, 'littlelink'])->name('littlelink');}
6566
Route::get('/@{littlelink}', [UserController::class, 'littlelink'])->name('littlelink');
6667
Route::get('/pages/{name}', [AdminController::class, 'pages'])->name('pages');
6768
Route::get('/theme/@{littlelink}', [UserController::class, 'theme'])->name('theme');

storage/templates/advanced-config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105

106106
// The URL prefix is the symbol that comes before a LittleLink URL.
107107
// For example the '@' in 'example.com/@admin'.
108-
// If empty no prefix is required. Use with caution.
108+
// If empty no prefix is required.
109109
'custom_url_prefix' => '+', // The '@' prefix will always work regardless of this setting.
110110

111111

0 commit comments

Comments
 (0)