Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=

# SENTRY_DSN=""
# SENTRY_PUBLIC_DSN=""
# SENTRY_ENABLE_LOGS=true
# SENTRY_LOG_LEVEL=debug

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ _ide_helper*
*.css.map
*.js.map
**/.phpunit.result.cache
**/.phpunit.cache
**/capistrano.log
deploy.php
Homestead.json
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
20
4 changes: 4 additions & 0 deletions app/Http/Controllers/ProfilesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ public function pdfExport(Profile $profile): Response
$pdf_content = $pdf_content->addChromiumArguments(config('pdf.chrome_arguments'));
}

if (config('pdf.http_username') && config('pdf.http_password')) {
$pdf_content = $pdf_content->authenticate(config('pdf.http_username'), config('pdf.http_password'));
}

return response($pdf_content->pdf())
->header('Content-Type', 'application/pdf');
}
Expand Down
4 changes: 2 additions & 2 deletions app/ProfileStudent.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class ProfileStudent extends Pivot implements Auditable
/**
* Modify the audit data
*
* @param array $data
* @return array
* @param array<string,mixed> $data
* @return array<string,mixed>
*/
public function transformAudit(array $data): array
{
Expand Down
6 changes: 4 additions & 2 deletions app/Resolvers/IpAddressResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ class IpAddressResolver implements Resolver
/**
* {@inheritdoc}
*
* @return string|array|null
* @return string
*/
public static function resolve(Auditable $auditable)
{
return Request::header('HTTP_X_FORWARDED_FOR', Request::ip());
$ip = Request::header('HTTP_X_FORWARDED_FOR', Request::ip());

return is_string($ip) ? $ip : '';
}
}
4 changes: 2 additions & 2 deletions app/UserDelegation.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class UserDelegation extends Pivot implements Auditable
/**
* Modify the audit data
*
* @param array $data
* @return array
* @param array<string,mixed> $data
* @return array<string,mixed>
*/
public function transformAudit(array $data): array
{
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"livewire/livewire": "^2.10",
"owen-it/laravel-auditing": "^13.0",
"predis/predis": "^1.1",
"sentry/sentry-laravel": "^3.2.0",
"spatie/browsershot": "^3.57",
"sentry/sentry-laravel": "^4.15.0",
"spatie/browsershot": "^5.1.0",
"spatie/laravel-backup": "^8.1",
"spatie/laravel-medialibrary": "^10.3.6",
"spatie/laravel-tags": "^4.3.2",
Expand Down
Loading
Loading