mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-02-02 09:50:46 +00:00
Add rate limits, fix typo and styling
This commit is contained in:
parent
1d86bff3f2
commit
3c249616ef
4 changed files with 16 additions and 23 deletions
|
@ -75,6 +75,6 @@ class AppRegisterController extends Controller
|
|||
'status' => 'success'
|
||||
]);
|
||||
|
||||
return redirect("pixelfed://verifyEmail?{$errorParams}");
|
||||
return redirect("pixelfed://verifyEmail?{$queryParams}");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,8 @@ use Horizon;
|
|||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Pagination\Paginator;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Cache\RateLimiting\Limit;
|
||||
use Illuminate\Support\Facades\RateLimiter;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
@ -85,6 +87,10 @@ class AppServiceProvider extends ServiceProvider
|
|||
];
|
||||
});
|
||||
|
||||
RateLimiter::for('app-signup', function (Request $request) {
|
||||
return Limit::perDay(10)->by($request->ip());
|
||||
});
|
||||
|
||||
// Model::preventLazyLoading(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -57,27 +57,14 @@
|
|||
@push('styles')
|
||||
<style>
|
||||
:root {
|
||||
--bg-color: #f8f9fa;
|
||||
--card-bg: #ffffff;
|
||||
--text-color: #212529;
|
||||
--text-muted: #6c757d;
|
||||
--input-bg: #ffffff;
|
||||
--input-border: #ced4da;
|
||||
--input-focus: #80bdff;
|
||||
--card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--bg-color: #111827;
|
||||
--card-bg: #1f2937;
|
||||
--text-color: #f3f4f6;
|
||||
--text-muted: #9ca3af;
|
||||
--input-bg: #374151;
|
||||
--input-border: #4b5563;
|
||||
--input-focus: #3b82f6;
|
||||
--card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
--bg-color: #111827;
|
||||
--card-bg: #1f2937;
|
||||
--text-color: #f3f4f6;
|
||||
--text-muted: #9ca3af;
|
||||
--input-bg: #374151;
|
||||
--input-border: #4b5563;
|
||||
--input-focus: #3b82f6;
|
||||
--card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
body {
|
||||
|
|
|
@ -140,7 +140,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
|||
Route::get('discover/location/country/{country}', 'PlaceController@directoryCities');
|
||||
|
||||
Route::get('/i/app-email-verify', 'AppRegisterController@index');
|
||||
Route::post('/i/app-email-verify', 'AppRegisterController@store');
|
||||
Route::post('/i/app-email-verify', 'AppRegisterController@store')->middleware('throttle:app-signup');
|
||||
|
||||
Route::group(['prefix' => 'i'], function () {
|
||||
Route::redirect('/', '/');
|
||||
|
|
Loading…
Reference in a new issue