diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 949349b..34996c0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,4 +26,4 @@ jobs: chmod 600 ~/.ssh/pkey eval "$(ssh-agent -s)" ssh-add ~/.ssh/pkey - ssh ${{ secrets.SECRET_USER }}@${{ secrets.SECRET_HOST }} -p ${{ secrets.SECRET_PORT }} "cd ./project/Swissdle && git pull origin main && cd backend-laravel && composer install && cd ../frontend-vue && npm install && npm run build && (crontab -l && crontab -r) || echo '* * * * * cd /home/laravel/project/Swissdle/backend-laravel && /usr/local/bin/php artisan schedule:run >> /home/laravel/project/Swissdle/cron.log' | crontab" \ No newline at end of file + ssh ${{ secrets.SECRET_USER }}@${{ secrets.SECRET_HOST }} -p ${{ secrets.SECRET_PORT }} "cd ./project/Swissdle && git pull origin main && cd backend-laravel && composer install && php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider" && cd ../frontend-vue && npm install && npm run build && (crontab -l && crontab -r) || echo '* * * * * cd /home/laravel/project/Swissdle/backend-laravel && /usr/local/bin/php artisan schedule:run >> /home/laravel/project/Swissdle/cron.log' | crontab" \ No newline at end of file diff --git a/backend-laravel/app/Providers/RouteServiceProvider.php b/backend-laravel/app/Providers/RouteServiceProvider.php index 1cf5f15..b06c5b7 100644 --- a/backend-laravel/app/Providers/RouteServiceProvider.php +++ b/backend-laravel/app/Providers/RouteServiceProvider.php @@ -24,6 +24,10 @@ class RouteServiceProvider extends ServiceProvider */ public function boot(): void { + if (App::environment() === "production") { + URL::forceScheme("https"); + } + RateLimiter::for('api', function (Request $request) { return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); });