mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update SpaController, redirect web ui hashtags to legacy page for unauthenticated users
This commit is contained in:
parent
7dc65456c7
commit
a44b812b13
2 changed files with 10 additions and 0 deletions
|
@ -126,4 +126,13 @@ class SpaController extends Controller
|
|||
}
|
||||
return redirect('/i/web/profile/' . $id);
|
||||
}
|
||||
|
||||
public function hashtagRedirect(Request $request, $tag)
|
||||
{
|
||||
if(!$request->user()) {
|
||||
return redirect('/discover/tags/' . $tag);
|
||||
}
|
||||
|
||||
return view('layouts.spa');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -351,6 +351,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
|||
Route::post('warning', 'AccountInterstitialController@read');
|
||||
Route::get('my2020', 'SeasonalController@yearInReview');
|
||||
|
||||
Route::get('web/hashtag/{tag}', 'SpaController@hashtagRedirect');
|
||||
Route::get('web/username/{id}', 'SpaController@usernameRedirect');
|
||||
Route::get('web/post/{id}', 'SpaController@webPost');
|
||||
Route::get('web/profile/{id}', 'SpaController@webProfile');
|
||||
|
|
Loading…
Reference in a new issue