Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined Constant illuminate\http\request::header_x_forwarded_all When Upgrading #381

Open
dbarzin opened this issue May 11, 2023 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@dbarzin
Copy link
Owner

dbarzin commented May 11, 2023

If you are upgrading your Laravel 8 project to Laravel 9 by importing your existing application code into a totally new Laravel 9 application skeleton, you may need to update your application's "trusted proxy" middleware.

// Before...
'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL;

// After...
 'headers' => 
    Illuminate\Http\Request::HEADER_X_FORWARDED_FOR | 
    Illuminate\Http\Request::HEADER_X_FORWARDED_HOST | 
    Illuminate\Http\Request::HEADER_X_FORWARDED_PORT | 
    Illuminate\Http\Request::HEADER_X_FORWARDED_PROTO | 
    Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB,

Source : (https://laravel.com/docs/9.x/upgrade#upgrade-9.0)

@dbarzin dbarzin self-assigned this May 11, 2023
@dbarzin dbarzin added the documentation Improvements or additions to documentation label May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant